mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-07-28 21:51:41 +00:00
13 lines
315 B
TypeScript
13 lines
315 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().currentid === track.id,
|
|
isCurrentPlaying:
|
|
queue().currentid === track.id && queue().playing,
|
|
};
|
|
}
|