From 1dec62f4c0db6f3346a0d514868359370d5fe29a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bonnet?= Date: Thu, 22 Dec 2022 10:08:13 +0100 Subject: [PATCH] fix(onboarding): remove env variable --- apps/console/src/app/app.tsx | 16 +--------------- apps/console/src/app/router/main.router.tsx | 8 ++++++++ .../console/src/environments/environment.prod.ts | 1 - apps/console/src/environments/environment.ts | 1 - 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/apps/console/src/app/app.tsx b/apps/console/src/app/app.tsx index 33bdf47b17a..bf9294a6ed5 100644 --- a/apps/console/src/app/app.tsx +++ b/apps/console/src/app/app.tsx @@ -9,10 +9,9 @@ import { useIntercom } from 'react-use-intercom' import { selectUser } from '@qovery/domains/user' import { DarkModeEnabler, Layout } from '@qovery/pages/layout' import { PageLogin, PageLogoutFeature } from '@qovery/pages/login' -import { PageOnboarding } from '@qovery/pages/onboarding' import { useAuth } from '@qovery/shared/auth' import { UserInterface } from '@qovery/shared/interfaces' -import { LOGIN_URL, LOGOUT_URL, ONBOARDING_URL, ProtectedRoute } from '@qovery/shared/router' +import { LOGIN_URL, LOGOUT_URL, ProtectedRoute } from '@qovery/shared/router' import { LoadingScreen } from '@qovery/shared/ui' import { useAuthInterceptor, useDocumentTitle } from '@qovery/shared/utils' import { environment } from '../environments/environment' @@ -54,19 +53,6 @@ export function App() { useAuthInterceptor(axios, environment.api) useEffect(() => { - // if (process.env['NODE_ENV'] === 'production') { - - // if onboarding feature flag activated we add onboarding routes to router - const isOnboarding = environment.onboarding === 'true' - if (isOnboarding) { - ROUTER.push({ - path: `${ONBOARDING_URL}/*`, - component: , - protected: true, - layout: false, - }) - } - // init logrocket if (process.env['NODE_ENV'] === 'production') { LogRocket.init(environment.logrocket) diff --git a/apps/console/src/app/router/main.router.tsx b/apps/console/src/app/router/main.router.tsx index 944aa277dd7..8809b7716c1 100644 --- a/apps/console/src/app/router/main.router.tsx +++ b/apps/console/src/app/router/main.router.tsx @@ -6,6 +6,7 @@ import { PageEnvironments } from '@qovery/pages/environments' import { PageApplicationLogs } from '@qovery/pages/logs/application' import { PageDeploymentLogs } from '@qovery/pages/logs/deployment' import { PageInfraLogs } from '@qovery/pages/logs/infra' +import { PageOnboarding } from '@qovery/pages/onboarding' import { OverviewPage } from '@qovery/pages/overview/feature' import { PageServices } from '@qovery/pages/services' import { PageSettings } from '@qovery/pages/settings' @@ -17,6 +18,7 @@ import { DEPLOYMENT_LOGS_URL, ENVIRONMENTS_URL, INFRA_LOGS_URL, + ONBOARDING_URL, ORGANIZATION_URL, OVERVIEW_URL, SERVICES_URL, @@ -34,6 +36,12 @@ interface RouterProps { } export const ROUTER: RouterProps[] = [ + { + path: `${ONBOARDING_URL}/*`, + component: , + protected: true, + layout: false, + }, { path: ORGANIZATION_URL(), component: , diff --git a/apps/console/src/environments/environment.prod.ts b/apps/console/src/environments/environment.prod.ts index f7f63d2f5ee..474570c44da 100644 --- a/apps/console/src/environments/environment.prod.ts +++ b/apps/console/src/environments/environment.prod.ts @@ -9,5 +9,4 @@ export const environment = { posthog_apihost: process.env?.['NX_POSTHOG_APIHOST'] || '', logrocket: process.env?.['NX_LOGROCKET'] || '', gtm: process.env?.['NX_GTM'] || '', - onboarding: process.env?.['NX_ONBOARDING'] || '', } diff --git a/apps/console/src/environments/environment.ts b/apps/console/src/environments/environment.ts index f7f63d2f5ee..474570c44da 100644 --- a/apps/console/src/environments/environment.ts +++ b/apps/console/src/environments/environment.ts @@ -9,5 +9,4 @@ export const environment = { posthog_apihost: process.env?.['NX_POSTHOG_APIHOST'] || '', logrocket: process.env?.['NX_LOGROCKET'] || '', gtm: process.env?.['NX_GTM'] || '', - onboarding: process.env?.['NX_ONBOARDING'] || '', }