Resolve TODO (workaround is necessary)

This commit is contained in:
Deluan 2020-05-05 12:35:50 -04:00
parent 0833d87f94
commit 0ee000a8a0

View File

@ -21,12 +21,8 @@ export const AlbumActions = ({
const dispatch = useDispatch() const dispatch = useDispatch()
const translate = useTranslate() const translate = useTranslate()
// TODO Not sure why data is accumulating tracks from previous plays... Needs investigation. For now, filter out // Filter out tracks from other albums (cached by ReactAdmin)
// the unwanted tracks const filteredData = ids.reduce((acc, id) => ({ ...acc, [id]: data[id] }), {})
const filteredData = ids.reduce((acc, id) => {
acc[id] = data[id]
return acc
}, {})
return ( return (
<TopToolbar className={className} {...sanitizeListRestProps(rest)}> <TopToolbar className={className} {...sanitizeListRestProps(rest)}>