Skip to content

Commit

Permalink
feat: don't reload the root on searches
Browse files Browse the repository at this point in the history
Would rather use `submission` here but we have a bug, and it's not being passed in.
  • Loading branch information
ryanflorence committed Jan 11, 2022
1 parent 7079663 commit 6e60d90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/containers/layout/layout.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ export function ErrorBoundary({ error }: { error: Error }) {
);
}

export let unstable_shouldReload: ShouldReloadFunction = ({ submission }) => {
return submission?.method.toLowerCase() === "post";
export let unstable_shouldReload: ShouldReloadFunction = ({ url }) => {
return !url.pathname.startsWith("/search");
};

export default function Root() {
Expand Down

0 comments on commit 6e60d90

Please sign in to comment.