MCPcopy Create free account
hub / github.com/Musish/Musish / queueState

Method queueState

src/app/components/Common/Player/Queue/QueueList.tsx:17–27  ·  view source on GitHub ↗
(index: number, position: number)

Source from the content-addressed store, hash-verified

15
16class QueueList extends React.Component<QueueListProps, QueueListState> {
17 public static queueState(index: number, position: number) {
18 if (index < position) {
19 return QueueItemState.Played;
20 }
21
22 if (index === position) {
23 return QueueItemState.Playing;
24 }
25
26 return QueueItemState.Queued;
27 }
28
29 public static getDerivedStateFromProps(props: QueueListProps) {
30 const { queue } = props.mk.instance.player;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected