From 7f1917a19853586d563da0bb871b72be3859fc81 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Tue, 9 Jul 2024 12:46:32 -0400 Subject: Added sorting repos --- src/components/GitHubProjects.svelte | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'src/components/GitHubProjects.svelte') diff --git a/src/components/GitHubProjects.svelte b/src/components/GitHubProjects.svelte index 9d9d569..8ae55af 100644 --- a/src/components/GitHubProjects.svelte +++ b/src/components/GitHubProjects.svelte @@ -1,6 +1,7 @@ + +
{#if isLoading} @@ -60,6 +101,11 @@ {#if error}
{error}
{:else} +
{#each repos.slice((currentPage - 1) * reposPerPage, currentPage * reposPerPage) as repo (repo.id)}
@@ -68,6 +114,9 @@ + {repo.stargazers_count} Stars + | + Last updated on {formatDate(repo.updated_at)}
{/each}
-- cgit v1.2.3