diff --git a/src/components/StatCards.svelte b/src/components/StatCards.svelte index b4dab96a..90dbc5a5 100644 --- a/src/components/StatCards.svelte +++ b/src/components/StatCards.svelte @@ -1,96 +1,122 @@ -
-
-
-
-
-
- {$_('runners')} -
-
69
-
- - - -
-
+ +

Allgemeine Statistiken

+{#await stats_promise} + -
-
-
-
-
- {$_('total-scans')} -
-
1500
-
-
-
-
-
-
-
-
-
- {$_('total-donations')} -
-
5000,00 €
-
- -
-
-
-
-
-
-
-
- {$_('total-distance')} -
-
100.0 km
+{:then stats} +
+
+
+
+
+
+ {$_('runners')} +
+
{stats.total_runners}
+
+ + + +
+
+
+
+
+
+
+
+ {$_('total-scans')} +
+
{stats.total_scans}
+
+
+
+
+
+
+
+
+
+ {$_('total-donations')} +
+
{stats.total_donation} €
+
+ +
+
+
+
+
+
+
+
+ {$_('total-distance')} +
+
+ {stats.total_distance / 1000} + km +
+
+ +
- -
-
+{:catch error} +
+ + 😢 Error + {error} + +
+{/await}