Skip to content

Commit

Permalink
fix: more button on items loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
SureshPradhana committed May 4, 2024
1 parent 9d71937 commit 8a010e6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/routes/ask/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
{#each items as item, i}
<News key={i} {item} />
{/each}

<button on:click={loadMoreItems}>More</button>
{#if items.length > 0}
<button on:click={loadMoreItems}>More</button>
{/if}

<style lang="postcss">
:global(html) {
Expand Down
5 changes: 3 additions & 2 deletions src/routes/jobs/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
{#each items as item, i}
<News key={i} {item} />
{/each}

<button on:click={loadMoreItems}>More</button>
{#if items.length > 0}
<button on:click={loadMoreItems}>More</button>
{/if}

<style lang="postcss">
:global(html) {
Expand Down
5 changes: 3 additions & 2 deletions src/routes/newest/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
{#each items as item, i}
<News key={i} {item} />
{/each}

<button on:click={loadMoreItems}>More</button>
{#if items.length > 0}
<button on:click={loadMoreItems}>More</button>
{/if}

<style lang="postcss">
:global(html) {
Expand Down
4 changes: 4 additions & 0 deletions src/routes/past/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@
{#each items as _, i}
<News key={i} />
{/each}
{#if items}
<button on:click={loadMoreItems}>More</button>
{/if}

<a href="/newest">More</a>
5 changes: 3 additions & 2 deletions src/routes/show/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
{#each items as item, i}
<News key={i} {item} />
{/each}

<button on:click={loadMoreItems}>More</button>
{#if items.length > 0}
<button on:click={loadMoreItems}>More</button>
{/if}

<style lang="postcss">
:global(html) {
Expand Down

0 comments on commit 8a010e6

Please sign in to comment.