From 5341b07e9aab68124e51b1ed6e708fecd7dc77e4 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Mon, 9 Sep 2024 23:35:38 -0700
Subject: refactor(reader): chapter list component

---
 src/lib/Reader/Chapters.svelte | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 src/lib/Reader/Chapters.svelte

(limited to 'src/lib/Reader/Chapters.svelte')

diff --git a/src/lib/Reader/Chapters.svelte b/src/lib/Reader/Chapters.svelte
new file mode 100644
index 00000000..9953036e
--- /dev/null
+++ b/src/lib/Reader/Chapters.svelte
@@ -0,0 +1,22 @@
+<script lang="ts">
+	export let data;
+</script>
+
+<ul>
+	{#each data.data as chapter}
+		<li>
+			{#if chapter.attributes.volume}
+				Vol. {chapter.attributes.volume}
+			{/if}
+			Ch. {chapter.attributes.chapter}
+			<span class="opaque">|</span>
+			<a
+				href={`https://mangadex.org/chapter/${chapter.id}`}
+				target="_blank"
+				rel="noopener noreferrer"
+			>
+				{chapter.attributes.title || 'Read'}
+			</a>
+		</li>
+	{/each}
+</ul>
-- 
cgit v1.2.3

