Add "keepalive" resource. It was causing issues in Firefox when using the dataProvider

This commit is contained in:
Deluan 2020-11-23 21:28:09 -05:00 committed by Joe Stump
parent efac842817
commit af67ff916e
No known key found for this signature in database
GPG Key ID: 29151C3EC48A0EB9
2 changed files with 4 additions and 1 deletions

View File

@ -110,6 +110,7 @@ const Admin = (props) => {
<Resource name="albumSong" />,
<Resource name="translation" />,
<Resource name="playlistTrack" />,
<Resource name="keepalive" />,
<Player />,
]}

View File

@ -256,7 +256,9 @@ const Player = () => {
const onAudioEnded = useCallback(
(currentPlayId, audioLists, info) => {
dispatch(currentPlaying(info))
dataProvider.getOne('keepalive', { id: info.trackId })
dataProvider
.getOne('keepalive', { id: info.trackId })
.catch((e) => console.log('Keepalive error:', e))
},
[dispatch, dataProvider]
)