-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from WhyAsh5114:migrate-to-svelte-infinite-loa…
…ding fix: Migrate to svelte-infinite-loading
- Loading branch information
Showing
11 changed files
with
232 additions
and
317 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<script lang="ts"> | ||
import Separator from '$lib/components/ui/separator/separator.svelte'; | ||
import InfiniteLoading, { type InfiniteEvent } from 'svelte-infinite-loading'; | ||
import LoaderCircle from 'virtual:icons/lucide/loader-circle'; | ||
type PropsType = { | ||
loadMore: (event: InfiniteEvent) => Promise<void>; | ||
identifier: unknown; | ||
entityPlural: string; | ||
}; | ||
let { loadMore, identifier, entityPlural }: PropsType = $props(); | ||
</script> | ||
|
||
<InfiniteLoading on:infinite={loadMore} {identifier}> | ||
<div class="flex items-center justify-center gap-2 py-2 text-muted-foreground" slot="noMore"> | ||
<Separator class="w-20" /> | ||
That's all | ||
<Separator class="w-20" /> | ||
</div> | ||
<div class="muted-text-box text-left" slot="noResults">No {entityPlural} found</div> | ||
<div slot="spinner"> | ||
<LoaderCircle class="mx-auto my-2 animate-spin" /> | ||
</div> | ||
</InfiniteLoading> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.