diff --git a/frontend/src/AppRoutes/index.tsx b/frontend/src/AppRoutes/index.tsx index 846ec02ac4..d98742c87d 100644 --- a/frontend/src/AppRoutes/index.tsx +++ b/frontend/src/AppRoutes/index.tsx @@ -59,9 +59,6 @@ function App(): JSX.Element { const isDarkMode = useIsDarkMode(); - const isOnboardingEnabled = - useFeatureFlags(FeatureKeys.ONBOARDING)?.active || false; - const isChatSupportEnabled = useFeatureFlags(FeatureKeys.CHAT_SUPPORT)?.active || false; @@ -77,6 +74,10 @@ function App(): JSX.Element { }, }); + const isOnboardingEnabled = + allFlags.find((flag) => flag.name === FeatureKeys.ONBOARDING)?.active || + false; + if (!isOnboardingEnabled || !isCloudUserVal) { const newRoutes = routes.filter( (route) => route?.path !== ROUTES.GET_STARTED,