MCPcopy Create free account
hub / github.com/OpenPipe/OpenPipe / setPageParams

Function setPageParams

app/src/utils/hooks.ts:94–108  ·  view source on GitHub ↗
(newPageParams: { page?: number; pageSize?: number })

Source from the content-addressed store, hash-verified

92 const pageSize = parseInt(router.query.pageSize as string, 10) || 10;
93
94 const setPageParams = (newPageParams: { page?: number; pageSize?: number }) => {
95 const updatedQuery = {
96 ...router.query,
97 ...newPageParams,
98 };
99
100 void router.push(
101 {
102 pathname: router.pathname,
103 query: updatedQuery as Query,
104 },
105 undefined,
106 { shallow: true },
107 );
108 };
109
110 return { page, pageSize, setPageParams };
111};

Callers 5

PaginatorFunction · 0.85
nextPageFunction · 0.85
prevPageFunction · 0.85
goToLastPageFunction · 0.85
goToFirstPageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected