Your Watching List
diff --git a/frontend/src/Header.svelte b/frontend/src/Header.svelte
index c86a42e..4366d76 100644
--- a/frontend/src/Header.svelte
+++ b/frontend/src/Header.svelte
@@ -4,14 +4,24 @@
import UserDialogue from "./UserHeaderDialogue.svelte";
import {
aniListLoggedIn,
- simklLoggedIn
- } from "./GlobalVariablesAndHelperFunctions.svelte";
+ simklLoggedIn,
+ loginToSimkl,
+ loginToAniList,
+ aniListUser,
+ simklUser
+ } from "./GlobalVariablesAndHelperFunctions.svelte"
+ import type {AniListUser} from "./anilist/types/AniListTypes";
+ import type {SimklUser} from "./simkl/types/simklTypes";
let isAniListLoggedIn: boolean
let isSimklLoggedIn: boolean
+ let currentAniListUser: AniListUser
+ let currentSimklUser: SimklUser
aniListLoggedIn.subscribe((value) => isAniListLoggedIn = value)
simklLoggedIn.subscribe((value) => isSimklLoggedIn = value)
+ aniListUser.subscribe((value) => currentAniListUser = value)
+ simklUser.subscribe((value) => currentSimklUser = value)
@@ -24,10 +34,18 @@
-
AniList
+ {#if isAniListLoggedIn}
+
AniList: {currentAniListUser.data.Viewer.name}
+ {:else}
+
+ {/if}
-
Simkl
+ {#if isSimklLoggedIn}
+
Simkl: {currentSimklUser.user.name}
+ {:else}
+
+ {/if}