Portal/rsconcept/frontend/src/hooks/useQueryStrings.ts
2024-11-25 19:52:57 +03:00

15 lines
265 B
TypeScript

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