From 5592893709a59695200c1a6416f1e2a58d66b9b0 Mon Sep 17 00:00:00 2001 From: Ark2307 Date: Fri, 20 Oct 2023 11:32:04 +0530 Subject: [PATCH] Fixed frontend bugs --- .../src/apps/dashboard/pages/test_editor/TestEditor.jsx | 7 +++++++ apps/dashboard/web/polaris_web/web/src/apps/main/App.js | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/test_editor/TestEditor.jsx b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/test_editor/TestEditor.jsx index cce0622b85..270c06a808 100644 --- a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/test_editor/TestEditor.jsx +++ b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/test_editor/TestEditor.jsx @@ -81,7 +81,14 @@ const TestEditor = () => { ) + const defaultId = "REMOVE_TOKENS"; + useEffect(() => { + const path = window.location.pathname; + const pathArr = path.split("test-editor") + if(pathArr[1].length < 2){ + navigate(defaultId) + } fetchAllTests() }, []) diff --git a/apps/dashboard/web/polaris_web/web/src/apps/main/App.js b/apps/dashboard/web/polaris_web/web/src/apps/main/App.js index c21f13100c..ddd7640070 100644 --- a/apps/dashboard/web/polaris_web/web/src/apps/main/App.js +++ b/apps/dashboard/web/polaris_web/web/src/apps/main/App.js @@ -223,6 +223,10 @@ const router = createBrowserRouter([ path: "test-editor/:testId", element: }, + { + path: "test-editor", + element: + }, { path: "onboarding", element: