From 447efaf6be58e6c0e81253d33316a890047b6557 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Mon, 28 Aug 2023 15:44:13 -0700
Subject: refactor(list): use interface for key

---
 src/lib/List/Due/MangaList.svelte | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

(limited to 'src/lib/List/Due/MangaList.svelte')

diff --git a/src/lib/List/Due/MangaList.svelte b/src/lib/List/Due/MangaList.svelte
index f6e1323d..022c8b97 100644
--- a/src/lib/List/Due/MangaList.svelte
+++ b/src/lib/List/Due/MangaList.svelte
@@ -47,9 +47,9 @@
 		const flattenedLists = flattenLists(media);
 		const releasingMedia = flattenedLists.filter(
 			(media: Media) =>
-				media['status'] == 'RELEASING' &&
-				media['format'] != 'NOVEL' &&
-				(media['mediaListEntry'] || { progress: 0 })['progress'] >=
+				media.status == 'RELEASING' &&
+				media.format != 'NOVEL' &&
+				(media.mediaListEntry || { progress: 0 }).progress >=
 					($displayNotStarted === 'true' ? 0 : 1)
 		);
 		let finalMedia = releasingMedia;
@@ -117,13 +117,13 @@
 		<ul>
 			{#each cleanedMedia as manga}
 				<li>
-					<a href={`https://anilist.co/manga/${manga['id']}`} target="_blank">
-						{manga['title']['english'] || manga['title']['romaji'] || manga['title']['native']}
+					<a href={`https://anilist.co/manga/${manga.id}`} target="_blank">
+						{manga.title.english || manga.title.romaji || manga.title.native}
 					</a>
 					<span style="opacity: 50%;">|</span>
-					{(manga['mediaListEntry'] || { progress: 0 })['progress']}
+					{(manga.mediaListEntry || { progress: 0 }).progress}
 					<a href="#" on:click={() => updateMedia(manga.id, manga.mediaListEntry?.progress)}>+</a>
-					[{manga['episodes'] || '?'}]
+					[{manga.episodes || '?'}]
 				</li>
 			{/each}
 		</ul>
-- 
cgit v1.2.3

