diff --git a/srcs/requirements/svelte/api_front/src/ProfileDisplay.svelte b/srcs/requirements/svelte/api_front/src/ProfileDisplay.svelte
index 4561572a..035a1e7a 100644
--- a/srcs/requirements/svelte/api_front/src/ProfileDisplay.svelte
+++ b/srcs/requirements/svelte/api_front/src/ProfileDisplay.svelte
@@ -2,9 +2,7 @@
import { onMount } from 'svelte';
- import {location} from 'svelte-spa-router';
- // this could be how i
-
+ import { location } from 'svelte-spa-router';
// this is how you access /:first for example
// export let params = {}
//
Your name is: {params.first}{#if params.last}{params.last}{/if}
@@ -24,6 +22,9 @@
let user;
let rank = '';
+
+ // i think i don't need to do this once i sort out the {wrap} conditions: in theory i could pass values to the Route
+ // once the async authentication check is done
onMount( async() => {
user = await fetch('http://transcendance:8080/api/v2/user')
.then( (x) => x.json() );
@@ -54,43 +55,39 @@
star.style.animation = "";
}
- // for(const star of document.getElementsByClassName("glitter-star")) {
- // setTimeout(() => {
- // animate(star);
+ // This is the part i invented, it was kinda a fucking nightmare...
+ let stars = [];
+
+ for (let i = 0; i < 3; i++) {
+ setTimeout(() => {
+ animate(stars[i]);
- // setInterval(() => animate(star), 1000);
- // }, index++ * (interval / 3))
- // }
-
-
-
+ setInterval(() => animate(stars[i]), 1000);
+ }, index++ * (interval / 3))
+ }
-
-
{#if user !== undefined}
-
-