Scheduling infrastructure for absolutely everyone.
Routing Forms - Avoid Flicker, Fix preload of Cal Font (#3368)
Hariom Balhara55152141ee1d
diff --git a/apps/web/components/Shell.tsx b/apps/web/components/Shell.tsxindex ae7f2961447..4d493552b2a 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 (<KBarRoot>- <Theme /><CustomBranding lightVal={user?.brandColor} darkVal={user?.darkBrandColor} /><MemoizedLayout plan={user?.plan} status={status} {...props} isLoading={isLoading} /><KBarContent />diff --git a/apps/web/pages/_app.tsx b/apps/web/pages/_app.tsxindex 425ec69da5e..67b062a7ec0 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) {<script dangerouslySetInnerHTML={{ __html: `window.CalComPageStatus = '${pageStatus}'` }} /><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /></Head>+ <Theme />{Component.requiresLicense ? (<LicenseRequired><Component {...pageProps} err={err} />diff --git a/apps/web/pages/_document.tsx b/apps/web/pages/_document.tsxindex 498d6ace0e0..2a90c6d097f 100644--- a/apps/web/pages/_document.tsx+++ b/apps/web/pages/_document.tsx@@ -15,7 +15,7 @@ class MyDocument extends Document<Props> {return (<Html lang={locale} dir={dir}><Head>- <link rel="preload" href="/cal.ttf" as="font" type="font/ttf" />+ <link rel="preload" href="/cal.ttf" as="font" type="font/ttf" crossOrigin="anonymous" /><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" /><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" /><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />diff --git a/packages/app-store/ee/routing_forms/components/RoutingNavBar.tsx b/packages/app-store/ee/routing_forms/components/RoutingNavBar.tsxindex 0ba75ec455e..7eb792ecd45 100644--- a/packages/app-store/ee/routing_forms/components/RoutingNavBar.tsx+++ b/packages/app-store/ee/routing_forms/components/RoutingNavBar.tsx@@ -22,7 +22,7 @@ export default function RoutingNavBar({];return (<div className="mb-4">- <NavTabs tabs={tabs} linkProps={{ shallow: true }} />+ <NavTabs tabs={tabs} /></div>);}diff --git a/turbo.json b/turbo.jsonindex 978bd8ce202..981f9efc10c 100644--- a/turbo.json+++ b/turbo.json@@ -3,6 +3,7 @@"baseBranch": "origin/main","pipeline": {"@calcom/prisma#build": {+ "cache": false,"dependsOn": ["post-install", "db-deploy"],"outputs": []},