feat: refine creation and registration flows

This commit is contained in:
Sacha
2026-07-30 09:42:12 +02:00
parent 3fff09ba81
commit 761f3cc200
39 changed files with 1444 additions and 1239 deletions
+4 -20
View File
@@ -3,7 +3,6 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'
import { Modal, Platform, Pressable, StyleSheet, Text, View } from 'react-native'
import useMinuit from 'react-native-minuit/src/hooks/useMinuit'
import BorderGradientButton from '../../components/BorderGradientButton'
import FullscreenIntroVideo from '../../components/FullscreenIntroVideo'
import GradientButton from '../../components/GradientButton'
import { Input } from '../../components/Input'
import MusicLandHeader from '../../components/MusicLandHeader'
@@ -19,7 +18,6 @@ import { background } from '../../assets'
export const ChooseCoverType = () => {
const isIOS = Platform.OS === 'ios'
const [showIntro, setShowIntro] = useState(true)
const [choiceVisible, setChoiceVisible] = useState(false)
const [pseudoVisible, setPseudoVisible] = useState(false)
const [choiceDismissAction, setChoiceDismissAction] = useState(null)
@@ -33,12 +31,6 @@ export const ChooseCoverType = () => {
const { setTooltip } = useMinuit()
const projectId = selectedProject?.id || selectedProjectId || null
const hasFinalCover = !!selectedProject?.coverUrl
const hasGeneratedOptions = Array.isArray(selectedProject?.cover?.options)
? selectedProject.cover.options.length > 0
: false
const generateCoverLabel = hasFinalCover ? 'Modifier la pochette' : 'Générer la pochette'
const hasArtistPreference = useMemo(() => {
if (currentUserData?.userName) return true
const pref = currentUserData?.artistNamePreference
@@ -108,13 +100,9 @@ export const ChooseCoverType = () => {
[currentUID, projectId]
)
const handleGenerateCover = useCallback(() => {
if (hasFinalCover || hasGeneratedOptions) {
navigate(Routes.ValidateCover)
return
}
const handleShowCover = useCallback(() => {
ensureArtistPreference(() => navigate(Routes.PouchReady))
}, [ensureArtistPreference, hasFinalCover, hasGeneratedOptions])
}, [ensureArtistPreference])
const closeChoiceModal = useCallback(() => {
setChoiceVisible(false)
@@ -276,15 +264,11 @@ export const ChooseCoverType = () => {
onPress={handlePickUserImage}
/> */}
<GradientButton
title={generateCoverLabel}
onPress={handleGenerateCover}
title="Voir ma pochette"
onPress={handleShowCover}
/>
</View>
</View>
{/*<FullscreenIntroVideo*/}
{/* visible={showIntro}*/}
{/* onClose={() => setShowIntro(false)}*/}
{/*/>*/}
<Modal
visible={choiceVisible}
transparent
File diff suppressed because it is too large Load Diff