Skip to content

Commit

Permalink
Fixed frontend bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ark2307 committed Oct 20, 2023
1 parent 003b16c commit 5592893
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,14 @@ const TestEditor = () => {
<TopBar secondaryMenu={headerComp} />
)

const defaultId = "REMOVE_TOKENS";

useEffect(() => {
const path = window.location.pathname;
const pathArr = path.split("test-editor")
if(pathArr[1].length < 2){
navigate(defaultId)
}
fetchAllTests()
}, [])

Expand Down
4 changes: 4 additions & 0 deletions apps/dashboard/web/polaris_web/web/src/apps/main/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ const router = createBrowserRouter([
path: "test-editor/:testId",
element: <TestEditor />
},
{
path: "test-editor",
element: <TestEditor />
},
{
path: "onboarding",
element: <Onboarding />
Expand Down

0 comments on commit 5592893

Please sign in to comment.