diff --git a/src/components/AudioPlayer/PlayerControl.tsx b/src/components/AudioPlayer/PlayerControl.tsx index 6982f9a..8252927 100644 --- a/src/components/AudioPlayer/PlayerControl.tsx +++ b/src/components/AudioPlayer/PlayerControl.tsx @@ -2,7 +2,7 @@ import Image from 'next/image'; -import { secondToDate } from '@/utils/timeFormat'; +import { secondToDate } from '@/utils/time'; import { AutoScrollContainer } from '@/components'; @@ -71,7 +71,7 @@ export default function AudioPlayer({ {/* time */}

{`${secondToDate(trackProgress)}`} - {` /${secondToDate(duration)}`} + {` /${secondToDate(duration || 0)}`}

@@ -96,7 +96,6 @@ export default function AudioPlayer({ className="flex justify-center items-center w-[54px] h-[54px] mx-[35px] rounded-[50%] bg-[rgba(180,67,67,1)] overflow-hidden" onClick={onPlay} > - {/* play */} pause string = (second) => { const h = hourNum ? `${hourNum}:` : ''; const m = minuteNum ? `${unitAddZero(minuteNum)}:` : `00:`; const s = unitAddZero(secondNum); - return `${h}${m}${s}`; };