Skip to content

Commit

Permalink
Merge pull request #265 from iSyqozz/isy/unnecessary-load-more-btn
Browse files Browse the repository at this point in the history
remove unnecessary load more button with 1 page of assets
  • Loading branch information
0xIchigo authored Dec 20, 2023
2 parents f17f3e9 + 1cc8a6c commit f4c578f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/routes/account/[account]/assets/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
$: lastPageHadAssets =
$assets.data?.pages[$assets.data.pages.length - 1].total > 0;
$: isOnePage = $assets.data?.pages.length == 1;
</script>

<div class="grid grid-cols-3 gap-3 md:grid-cols-5">
Expand All @@ -54,7 +57,7 @@
{/each}
</div>

{#if $assets.hasNextPage && lastPageHadAssets}
{#if $assets.hasNextPage && lastPageHadAssets &&!isOnePage}
<div class="flex justify-center">
<button
class="btn-outline btn"
Expand Down

0 comments on commit f4c578f

Please sign in to comment.