UNPKG

@matthew.ngo/react-filter-pilot

Version:

Powerful filtering, pagination, and sorting for React with TanStack Query integration

3 lines 611 B
import {a}from'../chunk-KDVV4H2M.js';import {useRouter}from'next/router';/* @matthew.ngo/react-filter-pilot - MIT License */ function u(){const s=useRouter();return {getParams:a(()=>{const e=new URLSearchParams;return Object.entries(s.query).forEach(([t,r])=>{Array.isArray(r)?e.set(t,r.join(",")):r&&e.set(t,r);}),e},"getParams"),setParams:a(e=>{const t={};e.forEach((r,n)=>{t[n]=r;}),s.push({pathname:s.pathname,query:t},void 0,{shallow:true});},"setParams")}}a(u,"useNextJsPagesUrlHandler");export{u as useNextJsPagesUrlHandler};//# sourceMappingURL=nextJsPages.js.map //# sourceMappingURL=nextJsPages.js.map