From 12e42427e2b6e27e085aa859fa5dec1bf7caf50c Mon Sep 17 00:00:00 2001 From: Dhairyashil Shinde <93669429+dhairyashiil@users.noreply.github.com> Date: Tue, 20 Jan 2026 01:43:33 +0530 Subject: [PATCH] fix(auth): show splash screen during auth check to prevent login flash (#27022) --- companion/app/_layout.tsx | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/companion/app/_layout.tsx b/companion/app/_layout.tsx index 6815b12463..862716032c 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 ( + + + + + ); + } const content = isAuthenticated ? (