From 7bb741bae4e97ce75af6f19ea3d32864a5af5bbf Mon Sep 17 00:00:00 2001 From: Collin Herber Date: Wed, 10 Jul 2024 10:23:09 -0400 Subject: [PATCH] feat: add in no player data found message if no leaders --- src/routes/leaderboards/+page.svelte | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/routes/leaderboards/+page.svelte b/src/routes/leaderboards/+page.svelte index 6be6752..18f557a 100644 --- a/src/routes/leaderboards/+page.svelte +++ b/src/routes/leaderboards/+page.svelte @@ -30,13 +30,21 @@ Data... {:then leaders} - {#each leaders as leader} + {#if leaders.length === 0} - {leader.name} - {leader.stats.level} - {leader.stats.experience} + No + player data + found - {/each} + {:else} + {#each leaders as leader} + + {leader.name} + {leader.stats.level} + {leader.stats.experience} + + {/each} + {/if} {:catch someError} Failed to load leaderboards {/await}