stop audio & go back to home
This commit is contained in:
@@ -152,6 +152,7 @@ const PlaybackDownload = ({ route }) => {
|
||||
const [isDownloading, setIsDownloading] = useState(false)
|
||||
const [hasAcceptedPublication, setHasAcceptedPublication] = useState(true)
|
||||
const hasShownAfterPlaybackRef = useRef(false)
|
||||
const publishSuccessMessage = action === 'playback' ? 'Playback publié !' : 'Chanson publiée !'
|
||||
|
||||
const afterPlaybackUrl = useMemo(() => {
|
||||
if (!videos) return null
|
||||
@@ -333,15 +334,11 @@ const PlaybackDownload = ({ route }) => {
|
||||
return
|
||||
}
|
||||
if (!project?.id) {
|
||||
if (action === 'playback') {
|
||||
setTooltip({
|
||||
type: 'success',
|
||||
text: 'Playback publié !',
|
||||
})
|
||||
navigate(Routes.Home)
|
||||
} else {
|
||||
navigate(Routes.SongRelease, { action })
|
||||
}
|
||||
setTooltip({
|
||||
type: 'success',
|
||||
text: publishSuccessMessage,
|
||||
})
|
||||
navigate(Routes.Home)
|
||||
return
|
||||
}
|
||||
let tempSourcePath = null
|
||||
@@ -402,15 +399,11 @@ const PlaybackDownload = ({ route }) => {
|
||||
{ merge: true }
|
||||
)
|
||||
|
||||
if (action === 'playback') {
|
||||
setTooltip({
|
||||
type: 'success',
|
||||
text: 'Playback publié !',
|
||||
})
|
||||
navigate(Routes.Home)
|
||||
} else {
|
||||
navigate(Routes.SongRelease, { action })
|
||||
}
|
||||
setTooltip({
|
||||
type: 'success',
|
||||
text: publishSuccessMessage,
|
||||
})
|
||||
navigate(Routes.Home)
|
||||
} catch (error) {
|
||||
console.log('[PlaybackDownload] publish error', {
|
||||
message: error?.message,
|
||||
|
||||
Reference in New Issue
Block a user