mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-06 17:26:29 +02:00
Add preloading of ad image
This commit is contained in:
@@ -28,6 +28,10 @@ export function StickyTopSponsor(props: StickyTopSponsorProps) {
|
|||||||
return;
|
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
|
// hide the onboarding strip when the sponsor is visible
|
||||||
isOnboardingStripHidden.set(true);
|
isOnboardingStripHidden.set(true);
|
||||||
}, [sponsor]);
|
}, [sponsor]);
|
||||||
|
Reference in New Issue
Block a user