diff --git a/apps/dashboard/src/hooks/use-test-page.ts b/apps/dashboard/src/hooks/use-test-page.ts index 510a2551658..02b5d58a0fa 100644 --- a/apps/dashboard/src/hooks/use-test-page.ts +++ b/apps/dashboard/src/hooks/use-test-page.ts @@ -1,9 +1,10 @@ -import { useLocation } from 'react-router-dom'; +import { ROUTES } from '@/utils/routes'; +import { useMatch } from 'react-router-dom'; export const useTestPage = () => { - const { pathname } = useLocation(); + const match = useMatch(ROUTES.TEST_WORKFLOW); return { - isTestPage: pathname.includes('/test'), + isTestPage: match !== null, }; };