Skip to content

Commit

Permalink
fix: changing tabs on user/pack pages no longer causes refetch
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNuclearNexus committed Sep 13, 2024
1 parent 22031e5 commit ee27307
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/client/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -368,11 +368,17 @@ export const subRoutes: RouteObject[] = [
path: ":owner",
element: <User />,
loader: loadUserData,
shouldRevalidate: ({currentParams, nextParams}) => {
return currentParams["owner"] !== nextParams["owner"]
}
},
{
path: "packs/:id",
element: <PackPage />,
loader: loadPackData,
shouldRevalidate: ({currentParams, nextParams}) => {
return currentParams["id"] !== nextParams["id"]
}
},
{
path: "bundles/:bundleId",
Expand Down

0 comments on commit ee27307

Please sign in to comment.