mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
Update Layout.tsx
This commit is contained in:
@@ -9,7 +9,7 @@ import TicketNotificationBell from '../TicketNotificationBell'
|
|||||||
import AnimatedBackground from '../AnimatedBackground'
|
import AnimatedBackground from '../AnimatedBackground'
|
||||||
import { contestsApi } from '../../api/contests'
|
import { contestsApi } from '../../api/contests'
|
||||||
import { pollsApi } from '../../api/polls'
|
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 { wheelApi } from '../../api/wheel'
|
||||||
import { themeColorsApi } from '../../api/themeColors'
|
import { themeColorsApi } from '../../api/themeColors'
|
||||||
import { promoApi } from '../../api/promo'
|
import { promoApi } from '../../api/promo'
|
||||||
@@ -240,8 +240,8 @@ export default function Layout({ children }: LayoutProps) {
|
|||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
// State to track if logo image has loaded
|
// State to track if logo image has loaded - start with true if already preloaded
|
||||||
const [logoLoaded, setLogoLoaded] = useState(false)
|
const [logoLoaded, setLogoLoaded] = useState(() => isLogoPreloaded())
|
||||||
|
|
||||||
// Fetch branding settings with localStorage cache for instant load
|
// Fetch branding settings with localStorage cache for instant load
|
||||||
const { data: branding } = useQuery({
|
const { data: branding } = useQuery({
|
||||||
|
|||||||
Reference in New Issue
Block a user