Skip to content

Commit

Permalink
Add preloading of ad image
Browse files Browse the repository at this point in the history
  • Loading branch information
kamranahmedse committed Nov 15, 2024
1 parent 1d15413 commit 75a6c91
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/PageSponsors/StickyTopSponsor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 75a6c91

Please sign in to comment.