import React from "react" import * as antd from "antd" import classnames from "classnames" import { ImageViewer } from "components" import { Icons } from "components/Icons" import { Context } from "contexts/WithPlayerContext" import "./index.less" export default (props) => { // use react context to get the current track const { currentManifest, playbackStatus, } = React.useContext(Context) const isCurrent = currentManifest?._id === props.track._id const isPlaying = isCurrent && playbackStatus === "playing" return
{ props.order } : } onClick={props.onClick} />
{props.track.title}
{props.track.artist}
{props.track.duration ?? "00:00"}
}