Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function Pagination() {
const reverse = useReverse(),
nav = useNav(),
{ multiple, page: pageNum, count, per_page } = useRenderContext(),
{ name: routeName, params } = useRouteInfo();
if (!(multiple && count && per_page)) {
return null;
}
const updateParams = newParams => {
nav(
reverse(
routeName,
{},
{
...params,
...newParams
}