diff options
| author | Fuwn <[email protected]> | 2023-12-18 14:10:40 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-12-18 14:10:40 -0800 |
| commit | 9df6cdd6c631d868eeb9a4045954d8b8eec4f78d (patch) | |
| tree | 66cf0b6327a54423bfd7c694e14f12370d5a90d6 /src/routes/schedule/+page.svelte | |
| parent | feat(schedule): anime schedule (diff) | |
| download | due.moe-9df6cdd6c631d868eeb9a4045954d8b8eec4f78d.tar.xz due.moe-9df6cdd6c631d868eeb9a4045954d8b8eec4f78d.zip | |
chore(schedule): fix types
Diffstat (limited to 'src/routes/schedule/+page.svelte')
| -rw-r--r-- | src/routes/schedule/+page.svelte | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/routes/schedule/+page.svelte b/src/routes/schedule/+page.svelte index 470ed607..39fc50d2 100644 --- a/src/routes/schedule/+page.svelte +++ b/src/routes/schedule/+page.svelte @@ -10,6 +10,8 @@ onMount(async () => { subsPleasePromise = fetch(`/api/subsplease?tz=${timeZone}`).then((r) => r.json()); }); + + const entryKey = (entry: unknown, key: string) => (entry as any)[key]; </script> {#await subsPleasePromise} @@ -32,14 +34,17 @@ <ul> {#each Object.values(scheduleEntry) as entry} <li class="entry"> - <a href={`https://anilist.co/search?search=${entry.title}`} target="_blank"> - {entry.title} + <a + href={`https://anilist.co/search?search=${entryKey(entry, 'title')}`} + target="_blank" + > + {entryKey(entry, 'title')} </a> {#if !$settings.displayCountdownRightAligned} <span style="opacity: 50%;">|</span> {/if} <span class:countdown={$settings.displayCountdownRightAligned}> - {entry.time} + {entryKey(entry, 'time')} </span> </li> {/each} |