Can easily create a brother or a sister

This commit is contained in:
2023-08-16 14:44:36 +02:00
parent 23fb77b152
commit ee14d629d4
3 changed files with 39 additions and 7 deletions

View File

@ -0,0 +1,11 @@
// A custom hook that builds on useLocation to parse
import React from "react";
import { useLocation } from "react-router-dom";
// the query string for you.
export function useQuery(): URLSearchParams {
const { search } = useLocation();
return React.useMemo(() => new URLSearchParams(search), [search]);
}