diff --git a/apps/web/components/Shell.tsx b/apps/web/components/Shell.tsx index ae7f296144..4d493552b2 100644 --- a/apps/web/components/Shell.tsx +++ b/apps/web/components/Shell.tsx @@ -39,7 +39,6 @@ import ErrorBoundary from "@lib/ErrorBoundary"; import classNames from "@lib/classNames"; import { shouldShowOnboarding } from "@lib/getting-started"; import useMeQuery from "@lib/hooks/useMeQuery"; -import useTheme from "@lib/hooks/useTheme"; import { trpc } from "@lib/trpc"; import CustomBranding from "@components/CustomBranding"; @@ -461,7 +460,6 @@ type LayoutProps = { export default function Shell(props: LayoutProps) { const { loading, session } = useRedirectToLoginIfUnauthenticated(props.isPublic); const { isRedirectingToOnboarding } = useRedirectToOnboardingIfNeeded(); - const { isReady, Theme } = useTheme("light"); const query = useMeQuery(); const user = query.data; @@ -469,7 +467,7 @@ export default function Shell(props: LayoutProps) { const i18n = useViewerI18n(); const { status } = useSession(); - const isLoading = isRedirectingToOnboarding || loading || !isReady; + const isLoading = isRedirectingToOnboarding || loading; // Don't show any content till translations are loaded. // As they are cached infintely, this status would be loading just once for the app's lifetime until refresh @@ -485,7 +483,6 @@ export default function Shell(props: LayoutProps) { return ( - diff --git a/apps/web/pages/_app.tsx b/apps/web/pages/_app.tsx index 425ec69da5..67b062a7ec 100644 --- a/apps/web/pages/_app.tsx +++ b/apps/web/pages/_app.tsx @@ -8,6 +8,7 @@ import LicenseRequired from "@ee/components/LicenseRequired"; import AppProviders, { AppProps } from "@lib/app-providers"; import { seoConfig } from "@lib/config/next-seo.config"; +import useTheme from "@lib/hooks/useTheme"; import I18nLanguageHandler from "@components/I18nLanguageHandler"; @@ -27,6 +28,8 @@ import "../styles/globals.css"; function MyApp(props: AppProps) { const { Component, pageProps, err, router } = props; let pageStatus = "200"; + const { Theme } = useTheme("light"); + if (router.pathname === "/404") { pageStatus = "404"; } else if (router.pathname === "/500") { @@ -42,6 +45,7 @@ function MyApp(props: AppProps) {