mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-16 07:00:53 -04:00
Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com> Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
11 lines
350 B
TypeScript
11 lines
350 B
TypeScript
/**
|
|
* The function is useful in cases where we want to preload a page
|
|
* but the link of the page isn't rendered on the screen.
|
|
* For more details, see https://github.com/freeCodeCamp/freeCodeCamp/pull/55472.
|
|
*/
|
|
export const preloadPage = (path: string | null) => {
|
|
if (!window.___loader || !path) return;
|
|
|
|
window.___loader.hovering(path);
|
|
};
|