UNPKG

@onesy/ui-react

Version:
21 lines 452 B
import { c as _c } from "react/compiler-runtime"; import React from 'react'; import { useLocation } from 'react-router-dom'; const useQuery = () => { const $ = _c(2); const { search } = useLocation(); let t0; if ($[0] !== search) { t0 = new URLSearchParams(search); $[0] = search; $[1] = t0; } else { t0 = $[1]; } const value = t0; return value; }; useQuery.displayName = 'onesy-UseQuery'; export default useQuery;