Pull current track from Redux store

Fixes #40
This commit is contained in:
Lei Nelissen
2021-04-03 14:49:49 +02:00
parent 28b330ad4c
commit d422c1ff1e
6 changed files with 86 additions and 41 deletions

View File

@@ -80,7 +80,7 @@ const Album: React.FC = () => {
const refresh = useCallback(() => { dispatch(fetchTracksByAlbum(id)); }, [id, dispatch]);
const selectTrack = useCallback(async (trackId) => {
const tracks = await playAlbum(id, false);
if (tracks) {
const track = tracks.find((t) => t.id.startsWith(trackId));