diff --git a/frontend/src/component/InitialRedirect.tsx b/frontend/src/component/InitialRedirect.tsx index 4377385f5261..553f69cb0746 100644 --- a/frontend/src/component/InitialRedirect.tsx +++ b/frontend/src/component/InitialRedirect.tsx @@ -4,8 +4,10 @@ import useProjects from '../hooks/api/getters/useProjects/useProjects'; import { useLastViewedProject } from '../hooks/useLastViewedProject'; import Loader from './common/Loader/Loader'; import { getSessionStorageItem, setSessionStorageItem } from '../utils/storage'; +import { useUiFlag } from '../hooks/useUiFlag'; export const InitialRedirect = () => { + const personalDashboardUiEnabled = useUiFlag('personalDashboardUI'); const { lastViewed } = useLastViewedProject(); const { projects, loading } = useProjects(); const navigate = useNavigate(); @@ -17,6 +19,10 @@ export const InitialRedirect = () => { return `/projects/${lastViewed}`; } + if (personalDashboardUiEnabled) { + return '/personal'; + } + if (projects && !lastViewed && projects.length === 1) { return `/projects/${projects[0].id}`; }