Skip to content

Commit

Permalink
add updateQueryStringParameter
Browse files Browse the repository at this point in the history
  • Loading branch information
doboy committed Oct 16, 2024
1 parent eff7301 commit 15497fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/utils/updateQueryStringParameter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const updateQueryStringParameter = (key: string, val: string) => {
const uri = new URL(window.location.href);
uri.searchParams.set(key, val);
window.history.replaceState({}, "Zitnr", uri.href);
};

0 comments on commit 15497fe

Please sign in to comment.