mirror of
https://codeberg.org/MarkusThielker/next-ory.git
synced 2025-07-05 06:09:18 +00:00
NORY-45: prepare custom query for pagination
This commit is contained in:
parent
5e01a7f50f
commit
2d2c021446
2 changed files with 27 additions and 7 deletions
|
@ -16,9 +16,9 @@ export default async function UserPage(
|
|||
const page = params.page ? Number(params.page) : 1;
|
||||
const query = params.query ? params.query as string : '';
|
||||
|
||||
let pageSize = 250;
|
||||
let pageSize = 50;
|
||||
|
||||
const initialData = await queryIdentities({ page, pageSize, query });
|
||||
const { data, pageCount } = await queryIdentities({ page, pageSize, query });
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
|
@ -34,7 +34,7 @@ export default async function UserPage(
|
|||
queryParamKey="query"
|
||||
placeholder="Search for identifiers (Email, Username...)"/>
|
||||
<IdentityDataTable
|
||||
data={initialData}
|
||||
data={data}
|
||||
page={page}
|
||||
query={query}/>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue