mirror of
https://github.com/LukeHagar/idn-admin-console.git
synced 2025-12-10 20:47:48 +00:00
Refactor pagination logic in identities page
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
|
||||
<div class="card flex justify-center flex-col align-middle">
|
||||
{#await data.totalCount then totalCount}
|
||||
{#if totalCount > 250 || Number(data.params.limit) < totalCount}
|
||||
<Paginator
|
||||
{onAmountChange}
|
||||
{onGo}
|
||||
@@ -41,9 +42,12 @@
|
||||
{sorters}
|
||||
{totalCount}
|
||||
/>
|
||||
{/if}
|
||||
{/await}
|
||||
{#await data.identities}
|
||||
<Progress />
|
||||
<div class="grid h-full place-content-center p-8">
|
||||
<Progress width="w-[100px]" />
|
||||
</div>
|
||||
{:then identities}
|
||||
<div class="table-container">
|
||||
<table class="table">
|
||||
@@ -99,6 +103,7 @@
|
||||
</div>
|
||||
{/await}
|
||||
{#await data.totalCount then totalCount}
|
||||
{#if totalCount > 250 || Number(data.params.limit) < totalCount}
|
||||
<Paginator
|
||||
{onAmountChange}
|
||||
{onGo}
|
||||
@@ -113,5 +118,6 @@
|
||||
{sorters}
|
||||
{totalCount}
|
||||
/>
|
||||
{/if}
|
||||
{/await}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user