diff options
Diffstat (limited to 'src/lib/Tools/Birthdays.svelte')
| -rw-r--r-- | src/lib/Tools/Birthdays.svelte | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/Tools/Birthdays.svelte b/src/lib/Tools/Birthdays.svelte index 6c81a233..49d72cfa 100644 --- a/src/lib/Tools/Birthdays.svelte +++ b/src/lib/Tools/Birthdays.svelte @@ -3,7 +3,7 @@ import { browser } from '$app/environment'; import { page } from '$app/stores'; import { ACDBBirthdays, type ACDBBirthday } from '$lib/Data/Birthday/secondary'; import { aniSearchBirthdays, type aniSearchBirthday } from '$lib/Data/Birthday/primary'; -import Error from '$lib/Error/RateLimited.svelte'; +import RateLimitedError from '$lib/Error/RateLimited.svelte'; import { onMount } from 'svelte'; import { clearAllParameters, parseOrDefault } from '../Utility/parameters'; import Skeleton from '$lib/Loading/Skeleton.svelte'; @@ -90,10 +90,10 @@ const combineBirthdaySources = ( return Array.from(nameMap.values()); }; -const resolveBirthdays = async ( +async function resolveBirthdays( month: number, day: number -): Promise<{ birthdays: Birthday[]; allSourcesFailed: boolean }> => { +): Promise<{ birthdays: Birthday[]; allSourcesFailed: boolean }> { const [acdbResult, aniSearchResult] = await Promise.allSettled([ ACDBBirthdays(month, day), browser ? aniSearchBirthdays(month, day) : Promise.resolve([]) @@ -105,7 +105,7 @@ const resolveBirthdays = async ( birthdays: combineBirthdaySources(acdb, aniSearch), allSourcesFailed: acdbResult.status === 'rejected' && aniSearchResult.status === 'rejected' }; -}; +} </script> {#await birthdays} @@ -114,7 +114,7 @@ const resolveBirthdays = async ( <Skeleton grid={true} count={100} width="150px" height="170px" /> {:then resolved} {#if resolved.allSourcesFailed} - <Error type="Character" card /> + <RateLimitedError type="Character" card /> {:else} <p> <select bind:value={month}> @@ -158,7 +158,7 @@ const resolveBirthdays = async ( </div> {/if} {:catch} - <Error type="Character" card /> + <RateLimitedError type="Character" card /> {/await} <style lang="scss"> |