Add preloading of ad image

pull/7743/head
Kamran Ahmed 1 week ago
parent 1d1541386f
commit 75a6c9133c
  1. 4
      src/components/PageSponsors/StickyTopSponsor.tsx

@ -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]);

Loading…
Cancel
Save