Files
swingmusic-extended/src/utils/useCreateTrackProps.ts
T
2023-01-13 18:13:49 +03:00

13 lines
343 B
TypeScript

import { Track } from "@/interfaces";
import queue from "@/stores/queue";
export default function createTrackProps(track: Track) {
return {
track,
index: track.index + 1,
isCurrent: queue().currenttrackhash === track.trackhash,
isCurrentPlaying:
queue().currenttrackhash === track.trackhash && queue().playing,
};
}