From 1e2c754ea1813b87636c405eb10cf135a6517260 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Mon, 25 Sep 2023 21:41:53 -0700
Subject: refactor(completed): title component

---
 src/lib/List/WatchingAnimeList.svelte | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

(limited to 'src/lib/List/WatchingAnimeList.svelte')

diff --git a/src/lib/List/WatchingAnimeList.svelte b/src/lib/List/WatchingAnimeList.svelte
index f86ede7d..02b35b01 100644
--- a/src/lib/List/WatchingAnimeList.svelte
+++ b/src/lib/List/WatchingAnimeList.svelte
@@ -8,6 +8,7 @@
 	import lastPruneTimes from '../../stores/lastPruneTimes';
 	import settings from '../../stores/settings';
 	import { cleanCache, totalEpisodes, updateMedia } from '$lib/Media/anime';
+	import ListTitle from './Due/ListTitle.svelte';
 
 	export let user: AniListAuthorisation;
 	export let identity: UserIdentity;
@@ -62,16 +63,13 @@
 </script>
 
 {#await animeLists}
-	<summary>Completed Anime [...] <small style="opacity: 50%">...s</small></summary>
+	<ListTitle custom="Completed Anime" />
 
 	<ul><li>Loading ...</li></ul>
 {:then media}
 	{@const cleanedMedia = cleanMedia(media)}
 
-	<summary
-		>Completed Anime [{cleanedMedia.length}]
-		<small style="opacity: 50%">{endTime / 1000}s</small></summary
-	>
+	<ListTitle count={cleanedMedia.length} time={endTime / 1000} custom="Completed Anime" />
 
 	{#if cleanedMedia.length === 0}
 		<ul>
@@ -112,7 +110,7 @@
 		{/each}
 	</ul>
 {:catch}
-	<summary>Upcoming Episodes [?] <small style="opacity: 50%">0s</small></summary>
+	<ListTitle count="?" time="0" custom="Completed Anime" />
 
 	<ul>
 		<li>
-- 
cgit v1.2.3

