import { useLocation } from "react-router";

const useURLSearchParam = (param: string) => {
	const params = new URLSearchParams(useLocation().search);
	const paramValue = params.get(param);
	return paramValue;
};

export { useURLSearchParam };
