Scheduling infrastructure for absolutely everyone.
fix(auth): show splash screen during auth check to prevent login flash (#27022)
Dhairyashil Shinde12e42427e2b6
diff --git a/companion/app/_layout.tsx b/companion/app/_layout.tsxindex 6815b12463f..862716032c8 100644--- a/companion/app/_layout.tsx+++ b/companion/app/_layout.tsx@@ -2,6 +2,7 @@ import { PortalHost } from "@rn-primitives/portal";import { isLiquidGlassAvailable } from "expo-glass-effect";import { Stack } from "expo-router";import { Platform, StatusBar, View } from "react-native";+import { CalComLogo } from "@/components/CalComLogo";import LoginScreenComponent from "@/components/LoginScreen";import { NetworkStatusBanner } from "@/components/NetworkStatusBanner";import { GlobalToast } from "@/components/ui/GlobalToast";@@ -11,7 +12,24 @@ import { ToastProvider } from "@/contexts/ToastContext";import "../global.css";function RootLayoutContent() {- const { isAuthenticated } = useAuth();+ const { isAuthenticated, loading } = useAuth();++ // Show Cal.com logo while checking auth state to prevent login flash+ if (loading) {+ return (+ <View+ style={{+ flex: 1,+ backgroundColor: "#FFFFFF",+ justifyContent: "center",+ alignItems: "center",+ }}+ >+ <StatusBar barStyle="dark-content" backgroundColor="#ffffff" />+ <CalComLogo width={120} height={26} />+ </View>+ );+ }const content = isAuthenticated ? (<Stack>