import { useLocation } from "react-router-dom";

export default function useQueryParameter(parameter: string): string | null {
  const { search } = useLocation();
  return new URLSearchParams(search).get(parameter);
}
