feat: benai chagne location
This commit is contained in:
@@ -17,7 +17,6 @@ import { background, icons } from '../../assets'
|
||||
import alert from '../../components/Alert'
|
||||
import BorderGradientButton from '../../components/BorderGradientButton'
|
||||
import CreditAmount from '../../components/CreditAmount'
|
||||
import FullscreenIntroVideo from '../../components/FullscreenIntroVideo'
|
||||
import GradientButton from '../../components/GradientButton'
|
||||
import ValidateModal from '../../components/modal/ValidateModal'
|
||||
import MusicLandHeader from '../../components/MusicLandHeader'
|
||||
@@ -43,11 +42,9 @@ const SongReady = () => {
|
||||
selectedProject,
|
||||
updateProjectData,
|
||||
updateUserData,
|
||||
videos,
|
||||
} = useUser()
|
||||
const [showValidateModal, setShowValidateModal] = useState(false)
|
||||
const [showRegenerateModal, setShowRegenerateModal] = useState(false)
|
||||
const [outroVideoUrl, setOutroVideoUrl] = useState(null)
|
||||
const [musicUrls, setMusicUrls] = useState([])
|
||||
const [selectedIndex, setSelectedIndex] = useState(0)
|
||||
const playerRefs = useRef({})
|
||||
@@ -114,7 +111,6 @@ const SongReady = () => {
|
||||
}, [selectedProject?.musicUrls])
|
||||
|
||||
const navigateToCover = useCallback(() => {
|
||||
setOutroVideoUrl(null)
|
||||
reset({
|
||||
index: 1,
|
||||
routes: [{ name: Routes.BottomTab }, { name: Routes.ChooseCoverType }],
|
||||
@@ -156,12 +152,7 @@ const SongReady = () => {
|
||||
})
|
||||
|
||||
await pauseAllPlayers()
|
||||
const benaiUrl = typeof videos?.benai === 'string' ? videos.benai.trim() : ''
|
||||
if (benaiUrl) {
|
||||
setOutroVideoUrl(benaiUrl)
|
||||
} else {
|
||||
navigateToCover()
|
||||
}
|
||||
navigateToCover()
|
||||
} catch (e) {
|
||||
console.log('Validate error', e?.message)
|
||||
}
|
||||
@@ -348,11 +339,6 @@ const SongReady = () => {
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
<FullscreenIntroVideo
|
||||
visible={!!outroVideoUrl}
|
||||
url={outroVideoUrl}
|
||||
onClose={navigateToCover}
|
||||
/>
|
||||
</Page>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user