From 0db432eb6969be7d2d9ebcfd07ab65653d7dc6ed Mon Sep 17 00:00:00 2001 From: Nevo David Date: Sat, 18 May 2024 23:58:13 +0700 Subject: [PATCH] feat: fix onboarding --- apps/frontend/src/components/layout/layout.context.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/frontend/src/components/layout/layout.context.tsx b/apps/frontend/src/components/layout/layout.context.tsx index b26fcb70..8269c602 100644 --- a/apps/frontend/src/components/layout/layout.context.tsx +++ b/apps/frontend/src/components/layout/layout.context.tsx @@ -3,6 +3,7 @@ import { ReactNode, useCallback } from 'react'; import { FetchWrapperComponent } from '@gitroom/helpers/utils/custom.fetch'; import { deleteDialog } from '@gitroom/react/helpers/delete.dialog'; +import { isGeneral } from '@gitroom/react/helpers/is.general'; export default function LayoutContext(params: { children: ReactNode }) { if (params?.children) { @@ -16,7 +17,7 @@ function LayoutContextInner(params: { children: ReactNode }) { const afterRequest = useCallback( async (url: string, options: RequestInit, response: Response) => { if (response?.headers?.get('onboarding')) { - window.location.href = '/analytics?onboarding=true'; + window.location.href = isGeneral() ? '/launches?onboarding=true' : '/analytics?onboarding=true'; } if (response?.headers?.get('reload')) {