From e1ca71dcea91ac5b0424b799a75c9c11c4a08b8a Mon Sep 17 00:00:00 2001 From: Yunus M Date: Tue, 1 Oct 2024 13:32:11 +0530 Subject: [PATCH] fix: get started on available for cloud users (#6103) Co-authored-by: Vikrant Gupta --- frontend/src/AppRoutes/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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,