Skip to content

Commit c9277fc

Browse files
committed
Remove shouldRevalidate
1 parent 50e760d commit c9277fc

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

app/pages/docs-layout.tsx

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { LinksFunction, LoaderFunctionArgs } from "react-router";
2-
import { type ShouldRevalidateFunction, Outlet } from "react-router";
2+
import { Outlet } from "react-router";
33
import classNames from "classnames";
44

55
import docsStylesheet from "~/styles/docs.css?url";
@@ -26,22 +26,6 @@ export let loader = async ({ params }: LoaderFunctionArgs) => {
2626
return { menu, header };
2727
};
2828

29-
export const shouldRevalidate: ShouldRevalidateFunction = ({
30-
currentParams,
31-
nextParams,
32-
defaultShouldRevalidate,
33-
}) => {
34-
// If both refs are defined and the same, the docs navigation is the same
35-
if (
36-
currentParams.ref &&
37-
nextParams.ref &&
38-
currentParams.ref === nextParams.ref
39-
) {
40-
return false;
41-
}
42-
return defaultShouldRevalidate;
43-
};
44-
4529
export default function DocsLayout() {
4630
return (
4731
<div className="[--header-height:theme(spacing.16)] [--nav-width:theme(spacing.72)] lg:m-auto lg:max-w-[90rem]">

0 commit comments

Comments
 (0)