@@ -84,8 +84,8 @@ export const TrackTableLineup = ({
84
84
: ( lineup . entries as LineupTrack [ ] )
85
85
} , [ lineup . entries , tracks , hasNextPage , pageSize ] )
86
86
87
- // Get the playing index by finding the current track in the data
88
- const playingIndex = useMemo ( ( ) => {
87
+ // Get the active index by finding the current track in the data
88
+ const activeIndex = useMemo ( ( ) => {
89
89
if ( ! currentQueueItem ?. uid ) return - 1
90
90
return entries . findIndex ( ( track ) => track . uid === currentQueueItem . uid )
91
91
} , [ currentQueueItem ?. uid , entries ] )
@@ -124,7 +124,7 @@ export const TrackTableLineup = ({
124
124
125
125
const onClickRow = useCallback (
126
126
( track : TrackWithUID , index : number ) => {
127
- if ( index === playingIndex && isPlaying ) {
127
+ if ( index === activeIndex && isPlaying ) {
128
128
pause ( )
129
129
dispatch (
130
130
make ( Name . PLAYBACK_PAUSE , {
@@ -142,7 +142,7 @@ export const TrackTableLineup = ({
142
142
)
143
143
}
144
144
} ,
145
- [ dispatch , isPlaying , pause , play , playingSource , playingIndex , entries ]
145
+ [ dispatch , isPlaying , pause , play , playingSource , activeIndex , entries ]
146
146
)
147
147
148
148
return (
@@ -152,7 +152,7 @@ export const TrackTableLineup = ({
152
152
onClickFavorite = { onClickFavorite }
153
153
onClickRepost = { onClickRepost }
154
154
playing = { isPlaying && ! isBuffering }
155
- activeIndex = { playingIndex }
155
+ activeIndex = { activeIndex }
156
156
onClickRow = { onClickRow }
157
157
fetchMore = { loadNextPage }
158
158
loading = { isInitialLoading }
0 commit comments