Refactor pagination logic in identities page

This commit is contained in:
luke-hagar-sp
2024-01-23 13:15:48 -06:00
parent e69949a7bf
commit 2f23f1d906

View File

@@ -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>