Skip to content

Commit

Permalink
preload once
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity committed Feb 6, 2025
1 parent 9edcc8e commit a328276
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/fern-docs/bundle/src/components/preload.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use client";

import { useEffect } from "react";
import ReactDOM from "react-dom";

export interface PreloadHref {
Expand All @@ -9,10 +8,6 @@ export interface PreloadHref {
}

export default function Preload({ href, options }: PreloadHref) {
useEffect(() => {
ReactDOM.preload(href, options);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [href]);

ReactDOM.preload(href, options);
return false;
}

0 comments on commit a328276

Please sign in to comment.