From db8f76ae04e579eecbd78b07ca7fbe8e9eb28c42 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Thu, 1 Feb 2024 00:24:27 -0800
Subject: fix(sequelyspy): require login

---
 src/lib/Tools/SequelSpy.svelte | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'src/lib/Tools/SequelSpy.svelte')

diff --git a/src/lib/Tools/SequelSpy.svelte b/src/lib/Tools/SequelSpy.svelte
index 5f2a64a4..ce6ea7e6 100644
--- a/src/lib/Tools/SequelSpy.svelte
+++ b/src/lib/Tools/SequelSpy.svelte
@@ -17,6 +17,7 @@
 	} from '$lib/Media/Cover/hoverCover';
 	import HoverCover from '$lib/Media/Cover/HoverCover.svelte';
 	import Skeleton from '$lib/Loading/Skeleton.svelte';
+	import identity from '$stores/identity';
 
 	export let user: AniListAuthorisation;
 
@@ -27,7 +28,8 @@
 	let hoverCoverState: HoverCoverResponse = {};
 
 	$: {
-		if (year.toString().length === 4) currentPrequels = prequels(user, year, season);
+		if (year.toString().length === 4 && $identity.id !== -2 && user)
+			currentPrequels = prequels(user, year, season);
 	}
 	$: {
 		if (browser) {
@@ -44,8 +46,8 @@
 		airingTime(prequel as unknown as Media, null);
 </script>
 
-{#if user === undefined}
-	Please log in to view this page.
+{#if user === undefined || $identity.id === -2}
+	<div class="popup card">Please log in to view this page.</div>
 {:else}
 	<div class="card">
 		<p>
-- 
cgit v1.2.3

