From 63f92c466cd6b1ce6e31b734b4c287485c1c7d88 Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 17 Jan 2024 15:00:57 +0300 Subject: [PATCH] audioplayer-fix --- src/components/Article/AudioPlayer/AudioPlayer.tsx | 2 +- src/components/Article/AudioPlayer/PlayerPlaylist.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/Article/AudioPlayer/AudioPlayer.tsx b/src/components/Article/AudioPlayer/AudioPlayer.tsx index 6c64bf68..ddbe8e40 100644 --- a/src/components/Article/AudioPlayer/AudioPlayer.tsx +++ b/src/components/Article/AudioPlayer/AudioPlayer.tsx @@ -16,7 +16,7 @@ type Props = { onChangeMediaIndex?: (direction: 'up' | 'down', index) => void } -const getFormattedTime = (point) => new Date(point * 1000).toISOString().slice(14, -5) +const getFormattedTime = (point: number) => new Date(point * 1000).toISOString().slice(14, -5) export const AudioPlayer = (props: Props) => { const audioRef: { current: HTMLAudioElement } = { current: null } diff --git a/src/components/Article/AudioPlayer/PlayerPlaylist.tsx b/src/components/Article/AudioPlayer/PlayerPlaylist.tsx index 0c528aaf..4102678e 100644 --- a/src/components/Article/AudioPlayer/PlayerPlaylist.tsx +++ b/src/components/Article/AudioPlayer/PlayerPlaylist.tsx @@ -54,8 +54,10 @@ export const PlayerPlaylist = (props: Props) => { when={activeEditIndex() === index() && props.editorMode} fallback={ <> -
{mi.title || t('Song title')}
-
{mi.artist || t('Artist')}
+
{mi.title || index()}
+ +
{mi.artist}
+
} >