From 8eec57f5606c1d1757383f4c0ca40d2cc3334572 Mon Sep 17 00:00:00 2001
From: Ilion Beyst <ilion.beyst@gmail.com>
Date: Sun, 21 Aug 2022 21:18:06 +0200
Subject: extract leaderboard from editor

---
 web/pw-server/src/lib/components/Leaderboard.svelte | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

(limited to 'web/pw-server/src/lib/components/Leaderboard.svelte')

diff --git a/web/pw-server/src/lib/components/Leaderboard.svelte b/web/pw-server/src/lib/components/Leaderboard.svelte
index d29d5d6..ea30384 100644
--- a/web/pw-server/src/lib/components/Leaderboard.svelte
+++ b/web/pw-server/src/lib/components/Leaderboard.svelte
@@ -1,20 +1,5 @@
 <script lang="ts">
-  import { onMount } from "svelte";
-
-  let leaderboard = [];
-
-  onMount(async () => {
-    const res = await fetch("/api/leaderboard", {
-      headers: {
-        "Content-Type": "application/json",
-      },
-    });
-
-    if (res.ok) {
-      leaderboard = await res.json();
-      console.log(leaderboard);
-    }
-  });
+  export let leaderboard;
 
   function formatRating(entry: object): any {
     const rating = entry["rating"];
-- 
cgit v1.2.3

