Portal/rsconcept/frontend/src/hooks/useQueryStrings.ts
IRBorisov 2759f10d09
Some checks failed
Backend CI / build (3.12) (push) Has been cancelled
Frontend CI / build (18.x) (push) Has been cancelled
Initial commit
2024-06-07 20:17:03 +03:00

15 lines
269 B
TypeScript

'use client';
import { useLocation } from 'react-router-dom';
function useQueryStrings() {
const search = useLocation().search;
function get(key: string) {
return new URLSearchParams(search).get(key);
}
return { get };
}
export default useQueryStrings;