From d032e236add60b1bde010e4f88b416971a86f06e Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Thu, 2 Apr 2026 17:02:59 +0800 Subject: [PATCH] tweaks --- web/app/components/app-initializer.tsx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/web/app/components/app-initializer.tsx b/web/app/components/app-initializer.tsx index ae587f2a87..22e04520e7 100644 --- a/web/app/components/app-initializer.tsx +++ b/web/app/components/app-initializer.tsx @@ -3,7 +3,7 @@ import type { ReactNode } from 'react' import Cookies from 'js-cookie' import { parseAsBoolean, useQueryState } from 'nuqs' -import { useCallback, useEffect, useState } from 'react' +import { useCallback, useEffect } from 'react' import { EDUCATION_VERIFY_URL_SEARCHPARAMS_ACTION, EDUCATION_VERIFYING_LOCALSTORAGE_ITEM, @@ -29,7 +29,6 @@ export const AppInitializer = ({ 'oauth_new_user', parseAsBoolean.withOptions({ history: 'replace' }), ) - const [isReady, setIsReady] = useState(false) const isSetupFinished = useCallback(async () => { try { const setUpStatus = await fetchSetupStatusWithCache() @@ -87,11 +86,7 @@ export const AppInitializer = ({ const redirectUrl = resolvePostLoginRedirect() if (redirectUrl) { location.replace(redirectUrl) - return } - - // Initialization completed without redirects; safe to render children - setIsReady(true) } catch { router.replace('/signin') @@ -99,8 +94,5 @@ export const AppInitializer = ({ })() }, [isSetupFinished, router, pathname, searchParams, oauthNewUser]) - if (!isReady) - return null - return children }