cloudflare-next-intl 0.9.25 → 0.9.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -24,7 +24,7 @@ function CustomLinkFunction({ href, prefetch, prefetchType = 'custom', onClick,
|
|
|
24
24
|
pathnames = href;
|
|
25
25
|
urlString = typeof href === 'object' ? (href.pathname || '') : (href || '');
|
|
26
26
|
}
|
|
27
|
-
const isCustom = prefetchType === 'custom';
|
|
27
|
+
const isCustom = prefetchType === 'custom' && prefetch !== false;
|
|
28
28
|
useEffect(() => {
|
|
29
29
|
setIsNavigating(false);
|
|
30
30
|
}, [pathname]);
|
|
@@ -66,7 +66,7 @@ function CustomLinkFunction({ href, prefetch, prefetchType = 'custom', onClick,
|
|
|
66
66
|
e.preventDefault();
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
|
-
const effectivePrefetch = isCustom ?
|
|
69
|
+
const effectivePrefetch = isCustom ? false : prefetch;
|
|
70
70
|
return _jsx(LinkComponent, { ref: ref, href: pathnames, prefetch: effectivePrefetch, onClick: handleClick, onMouseEnter: (e) => {
|
|
71
71
|
handleHoverPrefetch();
|
|
72
72
|
onMouseEnter?.(e);
|