From 59ab70311588dfcdd316344e2fd4947e6b4d66d8 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Fri, 26 Jan 2024 13:09:08 -0800
Subject: refactor(layout): use default identity settings on reset

---
 src/routes/+layout.svelte | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

(limited to 'src/routes/+layout.svelte')

diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index a1e9ef4b..bfece966 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -2,7 +2,7 @@
 	import { env } from '$env/dynamic/public';
 	import { userIdentity as getUserIdentity } from '$lib/AniList/identity';
 	import { onMount } from 'svelte';
-	import userIdentity from '$stores/identity';
+	import userIdentity, { defaultIdentity } from '$stores/identity';
 	import settings from '$stores/settings';
 	import { browser } from '$app/environment';
 	import HeadTitle from '$lib/Home/HeadTitle.svelte';
@@ -105,11 +105,7 @@
 					href={'#'}
 					class="header-item"
 					on:click={() => {
-						userIdentity.set({
-							id: -2,
-							name: '',
-							avatar: 'https://s4.anilist.co/file/anilistcdn/user/avatar/large/default.png'
-						});
+						userIdentity.set(defaultIdentity);
 
 						window.location.href = root('/api/authentication/log-out');
 					}}
-- 
cgit v1.2.3

