diff options
| author | Fuwn <[email protected]> | 2023-12-13 04:35:25 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-12-13 04:37:11 -0800 |
| commit | d11604739bad5966b5439262ae5243571a20d0e9 (patch) | |
| tree | 18e5d04b6bcf4363ceea64f71aa6f7533f8de33a /src/lib/Media/anime.ts | |
| parent | feat(anime): better time display (diff) | |
| download | due.moe-d11604739bad5966b5439262ae5243571a20d0e9.tar.xz due.moe-d11604739bad5966b5439262ae5243571a20d0e9.zip | |
style(anime): simplify expressions
Diffstat (limited to 'src/lib/Media/anime.ts')
| -rw-r--r-- | src/lib/Media/anime.ts | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/lib/Media/anime.ts b/src/lib/Media/anime.ts index 16deb5fe..354321db 100644 --- a/src/lib/Media/anime.ts +++ b/src/lib/Media/anime.ts @@ -4,24 +4,15 @@ import { mediaListCollection, type Media, Type } from '../AniList/media'; import lastPruneTimes from '../../stores/lastPruneTimes'; import type { AniListAuthorisation, UserIdentity } from '../AniList/identity'; -export const cleanCache = (user: AniListAuthorisation, identity: UserIdentity) => { - return mediaListCollection( - user, - identity, - Type.Anime, - get(anime), - get(lastPruneTimes).anime, - true - ); -}; +export const cleanCache = (user: AniListAuthorisation, identity: UserIdentity) => + mediaListCollection(user, identity, Type.Anime, get(anime), get(lastPruneTimes).anime, true); export const updateMedia = (id: number, progress: number | undefined, callback: () => void) => { fetch(`/api/anilist-increment?id=${id}&progress=${(progress || 0) + 1}`).then(callback); }; -export const totalEpisodes = (anime: Media) => { - return anime.episodes === null ? '' : `<span style="opacity: 50%">/${anime.episodes}</span>`; -}; +export const totalEpisodes = (anime: Media) => + anime.episodes === null ? '' : `<span style="opacity: 50%">/${anime.episodes}</span>`; export const airingTime = (anime: Media, upcoming = false) => { const airingAt = anime.nextAiringEpisode?.airingAt; |