feat: fix onboarding
This commit is contained in:
parent
74b5b471b8
commit
0db432eb69
|
|
@ -3,6 +3,7 @@
|
||||||
import { ReactNode, useCallback } from 'react';
|
import { ReactNode, useCallback } from 'react';
|
||||||
import { FetchWrapperComponent } from '@gitroom/helpers/utils/custom.fetch';
|
import { FetchWrapperComponent } from '@gitroom/helpers/utils/custom.fetch';
|
||||||
import { deleteDialog } from '@gitroom/react/helpers/delete.dialog';
|
import { deleteDialog } from '@gitroom/react/helpers/delete.dialog';
|
||||||
|
import { isGeneral } from '@gitroom/react/helpers/is.general';
|
||||||
|
|
||||||
export default function LayoutContext(params: { children: ReactNode }) {
|
export default function LayoutContext(params: { children: ReactNode }) {
|
||||||
if (params?.children) {
|
if (params?.children) {
|
||||||
|
|
@ -16,7 +17,7 @@ function LayoutContextInner(params: { children: ReactNode }) {
|
||||||
const afterRequest = useCallback(
|
const afterRequest = useCallback(
|
||||||
async (url: string, options: RequestInit, response: Response) => {
|
async (url: string, options: RequestInit, response: Response) => {
|
||||||
if (response?.headers?.get('onboarding')) {
|
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')) {
|
if (response?.headers?.get('reload')) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue