Skip to content

Commit

Permalink
Also add hash to pushState
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardehrenfried committed Jun 20, 2024
1 parent 1c001be commit 9e16294
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client-next/src/hooks/useTripQueryVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const getInitialVariables = () => {
const updateUrlWithVariables = (variables: TripQueryVariables) => {
const urlParams = new URLSearchParams(window.location.search);
urlParams.set('variables', encodeURIComponent(JSON.stringify(variables)));
history.pushState({}, '', '?' + urlParams.toString());
history.pushState({}, '', '?' + urlParams.toString() + window.location.hash);
};

export const useTripQueryVariables = () => {
Expand Down

0 comments on commit 9e16294

Please sign in to comment.