Remove deprecation warning about `notify`

This commit is contained in:
Deluan 2024-04-13 15:27:54 -04:00
parent 5fc78f120c
commit d968f7f530
1 changed files with 7 additions and 3 deletions

View File

@ -54,15 +54,19 @@ export const AddToPlaylistDialog = () => {
})
.then(() => {
const len = trackIds.length
notify('message.songsAddedToPlaylist', 'info', { smart_count: len })
notify('message.songsAddedToPlaylist', {
messageArgs: { smart_count: len },
})
onSuccess && onSuccess(value, len)
refresh()
})
.catch(() => {
notify('ra.page.error', 'warning')
notify('ra.page.error', { type: 'warning' })
})
} else {
notify('message.songsAddedToPlaylist', 'info', { smart_count: 0 })
notify('message.songsAddedToPlaylist', {
messageArgs: { smart_count: 0 },
})
}
}