From f309804f09d4ebd8c41b73918225b4a97873ebd9 Mon Sep 17 00:00:00 2001 From: mradigen <55953083+mradigen@users.noreply.github.com> Date: Sun, 14 Apr 2024 16:22:21 +0530 Subject: [PATCH] Let's get started --- src/routes/leaderboard/+page.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/routes/leaderboard/+page.svelte b/src/routes/leaderboard/+page.svelte index 29e7e75..dac8207 100644 --- a/src/routes/leaderboard/+page.svelte +++ b/src/routes/leaderboard/+page.svelte @@ -15,7 +15,10 @@ async function loadTeams() { // loading = true; - const { data, error } = await supabase.from('leaderboard').select('name, points'); + const { data, error } = await supabase + .from('leaderboard') + .select('name, points') + .order('points', { ascending: false }); if (error) console.log('Error Fetching Teams:', error.message); if (data.length) leaderboard = data; loading = false;