From 0207f5259a3a54be5cc6f26d7ff3818e891d9130 Mon Sep 17 00:00:00 2001 From: Egor Date: Wed, 21 Jan 2026 08:41:40 +0300 Subject: [PATCH] Update Layout.tsx --- src/components/layout/Layout.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/layout/Layout.tsx b/src/components/layout/Layout.tsx index d191908..813cecb 100644 --- a/src/components/layout/Layout.tsx +++ b/src/components/layout/Layout.tsx @@ -9,7 +9,7 @@ import TicketNotificationBell from '../TicketNotificationBell' import AnimatedBackground from '../AnimatedBackground' import { contestsApi } from '../../api/contests' import { pollsApi } from '../../api/polls' -import { brandingApi, getCachedBranding, setCachedBranding, preloadLogo } from '../../api/branding' +import { brandingApi, getCachedBranding, setCachedBranding, preloadLogo, isLogoPreloaded } from '../../api/branding' import { wheelApi } from '../../api/wheel' import { themeColorsApi } from '../../api/themeColors' import { promoApi } from '../../api/promo' @@ -240,8 +240,8 @@ export default function Layout({ children }: LayoutProps) { } }, []) - // State to track if logo image has loaded - const [logoLoaded, setLogoLoaded] = useState(false) + // State to track if logo image has loaded - start with true if already preloaded + const [logoLoaded, setLogoLoaded] = useState(() => isLogoPreloaded()) // Fetch branding settings with localStorage cache for instant load const { data: branding } = useQuery({