From 8b8c844e243429c002d36b198dfb44b8b844bf44 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sat, 17 Feb 2024 17:21:47 -0800
Subject: chore(hololive): remove unused sorter

---
 src/routes/hololive/+page.svelte | 21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

(limited to 'src/routes/hololive/+page.svelte')

diff --git a/src/routes/hololive/+page.svelte b/src/routes/hololive/+page.svelte
index 099a09fc..e5d31056 100644
--- a/src/routes/hololive/+page.svelte
+++ b/src/routes/hololive/+page.svelte
@@ -45,24 +45,6 @@
 	};
 
 	const typeSchedule = (schedule: any) => schedule as ParseResult;
-
-	const getClosestUpcomingPinnedStreams = (schedule: ParseResult) => {
-		const now = Date.now();
-		let closestUpcomingPinnedStreams = new Map();
-
-		schedule.lives.forEach((live) => {
-			const liveTime = new Date(live.time).getTime();
-
-			if (liveTime > now && pinnedStreams.includes(live.streamer)) {
-				const existing = closestUpcomingPinnedStreams.get(live.streamer);
-
-				if (!existing || liveTime < new Date(existing.time).getTime())
-					closestUpcomingPinnedStreams.set(live.streamer, live);
-			}
-		});
-
-		return closestUpcomingPinnedStreams;
-	};
 </script>
 
 <HeadTitle route="hololive Schedule" path="/hololive" />
@@ -79,9 +61,8 @@
 			<Skeleton grid={true} count={100} width="49%" height="16.25em" />
 		{:then untypedSchedule}
 			{@const schedule = typeSchedule(parseScheduleHtml(untypedSchedule))}
-			{@const closestUpcomingPinnedStreams = getClosestUpcomingPinnedStreams(schedule)}
 
-			<Lives {schedule} {closestUpcomingPinnedStreams} {pinnedStreams} {getPinnedStreams} />
+			<Lives {schedule} {pinnedStreams} {getPinnedStreams} />
 		{:catch}
 			<Message loader="ripple" slot>
 				{$locale().hololive.parseError}
-- 
cgit v1.2.3

