1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-01-17 22:28:32 +01:00

Add preloading of ad image

This commit is contained in:
Kamran Ahmed 2024-11-15 07:18:31 -07:00
parent 1d1541386f
commit 75a6c9133c

View File

@ -28,6 +28,10 @@ export function StickyTopSponsor(props: StickyTopSponsorProps) {
return;
}
// preload the image so that we don't see a flicker
const img = new Image();
img.src = sponsor.imageUrl;
// hide the onboarding strip when the sponsor is visible
isOnboardingStripHidden.set(true);
}, [sponsor]);