Skip to content

Commit

Permalink
fix(app): don't scroll to top on query param update
Browse files Browse the repository at this point in the history
  • Loading branch information
mgramigna committed Dec 31, 2023
1 parent 6c0adef commit fa4d4c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/nextjs/src/components/forms/CreateGameForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ export const CreateGameForm = ({
const search = currentParams.toString();
const query = search !== "" ? `?${search}` : "";

router.push(`${pathname}${query}`);
router.push(`${pathname}${query}`, {
scroll: false,
});
},
[pathname, router, searchParams],
);
Expand Down

0 comments on commit fa4d4c2

Please sign in to comment.