Skip to content

Commit 9292f06

Browse files
committed
fix missing decode in useQueryState
1 parent a3a11ac commit 9292f06

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

client/src/hooks/useQueryState.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export function useQueryState<T>(
1818
) {
1919
function getQueryValue() {
2020
const searchParams = new URLSearchParams(window.location.search);
21-
return searchParams.get(key);
21+
const param = searchParams.get(key);
22+
return param === null ? null : decodeURIComponent(param);
2223
}
2324
function processQueryValue(queryValue: string | null) {
2425
return queryValue === null ? null : processor.fromString(queryValue);

0 commit comments

Comments
 (0)