feat: change mail and change password
This commit is contained in:
+23
-11
@@ -25,6 +25,7 @@ import { FONT_FAMILY } from '../../styles/Fonts'
|
||||
import { getCreationStageStates, getStageAction } from '../../utils/projectStages'
|
||||
import { openCoinPackModal } from '../../utils/coinPackModal'
|
||||
import useNavigateToMusicDetails from '../../hooks/useNavigateToMusicDetails'
|
||||
import usePlayer from '../../hooks/usePlayer'
|
||||
import StageCard from './components/StageCard'
|
||||
import ClubCard from './components/ClubCard'
|
||||
import { BlurView } from 'expo-blur'
|
||||
@@ -158,6 +159,8 @@ const Home = ({ navigation, route }) => {
|
||||
const projectDropdownRef = useRef(null)
|
||||
const [hasLocalAdventureFlag, setHasLocalAdventureFlag] = useState(false)
|
||||
|
||||
const { play } = usePlayer()
|
||||
|
||||
const handleSelectProject = useCallback(
|
||||
(project) => {
|
||||
if (!project?.id) return
|
||||
@@ -210,6 +213,25 @@ const Home = ({ navigation, route }) => {
|
||||
menuAnchorRef.current = normalizedAnchor
|
||||
}, [])
|
||||
|
||||
const handlePlayProject = useCallback(
|
||||
(project) => {
|
||||
if (!project?.id || !project?.songUrl) return
|
||||
const cover = project.coverUrl || project.coverUri || project.cover
|
||||
play({
|
||||
id: project.id,
|
||||
url: project.songUrl,
|
||||
title: project.title || 'Sans titre',
|
||||
artist: 'MusicLand',
|
||||
artwork: cover,
|
||||
coverUrl: typeof cover === 'string' ? cover : cover?.uri,
|
||||
metadata: {
|
||||
projectId: project.id,
|
||||
},
|
||||
})
|
||||
},
|
||||
[play]
|
||||
)
|
||||
|
||||
const moreMenuItems = useMemo(() => {
|
||||
if (!menuProject?.id) return []
|
||||
|
||||
@@ -228,17 +250,6 @@ const Home = ({ navigation, route }) => {
|
||||
})
|
||||
},
|
||||
})
|
||||
items.push({
|
||||
label: 'Jouer la musique',
|
||||
onPress: () => {
|
||||
projectDropdownRef.current?.close?.()
|
||||
navigateToMusicDetails({
|
||||
projectId: menuProject.id,
|
||||
songUrl: menuProject.songUrl,
|
||||
project: menuProject,
|
||||
})
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
items.push({
|
||||
@@ -540,6 +551,7 @@ const Home = ({ navigation, route }) => {
|
||||
allowEmptySelection
|
||||
onSelectProject={handleSelectProject}
|
||||
onModifyProject={handleModifyProject}
|
||||
onPlayProject={handlePlayProject}
|
||||
onCreateProject={handleStartNew}
|
||||
formatDate={formatDate}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user