Skip to content

Commit

Permalink
Revert to 300ms delay in Link wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
armans-code committed Oct 22, 2024
1 parent df76ae1 commit 497a658
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ui/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const Link: typeof NextLink = (({ children, ...props }) => {
}, console.error);
// Stop observing once images are prefetched
observer.unobserve(entry.target);
}, 0); // No delay
}, 300); // 300ms delay
} else if (prefetchTimeout) {
// If the element leaves the viewport before 1 second, cancel the prefetch
clearTimeout(prefetchTimeout);
Expand Down

0 comments on commit 497a658

Please sign in to comment.