diff --git a/src/app/playlist/[playlistId]/page.tsx b/src/app/playlist/[playlistId]/page.tsx index 77c6523..6df1ccb 100644 --- a/src/app/playlist/[playlistId]/page.tsx +++ b/src/app/playlist/[playlistId]/page.tsx @@ -1,10 +1,10 @@ 'use client' -import React, {useEffect, useRef, useState} from 'react' +import React, { useEffect, useRef, useState } from 'react'; -import '../../global.css' -import {useParams} from "next/navigation" +import '../../global.css'; +import { useParams } from "next/navigation"; import AudioPlayer from "@/components/audioPlayer"; -import {getTimeLength} from "@/app/utils/timeManipulator"; +import { getTimeLength } from "@/app/utils/timeManipulator"; const AudioPlayerSkeleton = () => { return ( @@ -82,34 +82,54 @@ export default function Page(): React.JSX.Element { } return ( - - - - {currentTrack ? - changeTrack('next')} - onPrev={() => changeTrack('prev')}> : - } - - - {tracks ? ( - {tracks?.map((track: any, index: number) => ( - - { - setCurrentTrackIndex(index) - setCurrentTrack(tracks?.at(index) ?? undefined) - }}> - {index + 1} - {track.name} - {getTimeLength(track.duration_ms)} - - - ))} - ) : } - - - - ) + + + + {currentTrack ? ( + changeTrack("next")} + onPrev={() => changeTrack("prev")} + > + ) : ( + + )} + + + {tracks ? ( + + {tracks?.map((track: any, index: number) => ( + + { + setCurrentTrackIndex(index); + setCurrentTrack(tracks?.at(index) ?? undefined); + }} + > + {index + 1} + {track.name} + + {getTimeLength(track.duration_ms)} + + + + ))} + + ) : ( + + )} + + + + ); } \ No newline at end of file