alert after paroles

This commit is contained in:
2025-10-20 10:03:36 +02:00
parent a0de26b41f
commit f9b478fe22
7 changed files with 59 additions and 32 deletions
+5 -7
View File
@@ -198,9 +198,7 @@ const CreateLyricsWithAi = () => {
style: resolvedStyle,
audience: audience?.trim() ? audience.trim() : undefined,
structure:
(customStructure &&
parsedStructure &&
customStructure.length === parsedStructure.length
(Array.isArray(customStructure) && customStructure.length > 0
? customStructure
: parsedStructure) || undefined,
rhymes: rhymes || undefined,
@@ -279,11 +277,11 @@ const CreateLyricsWithAi = () => {
// sauter Rhymes et CreatingLyrics et aller directement sur Lyrics
if (hasLyrics && selectedIndex === 6) {
const chosenStructure =
(customStructure &&
parsedStructure &&
customStructure.length === parsedStructure.length
Array.isArray(customStructure) && customStructure.length > 0
? customStructure
: parsedStructure) || [];
: Array.isArray(parsedStructure)
? parsedStructure
: [];
await updateProjectData({
config: { structure: chosenStructure },
selections: {
@@ -203,9 +203,7 @@ const CreateLyricsWithAi = () => {
style: resolvedStyle,
audience: audience?.trim() ? audience.trim() : undefined,
structure:
(customStructure &&
parsedStructure &&
customStructure.length === parsedStructure.length
(Array.isArray(customStructure) && customStructure.length > 0
? customStructure
: parsedStructure) || undefined,
rhymes: rhymes || undefined,
@@ -284,11 +282,11 @@ const CreateLyricsWithAi = () => {
// sauter Rhymes et CreatingLyrics et aller directement sur Lyrics
if (hasLyrics && selectedIndex === 6) {
const chosenStructure =
(customStructure &&
parsedStructure &&
customStructure.length === parsedStructure.length
Array.isArray(customStructure) && customStructure.length > 0
? customStructure
: parsedStructure) || [];
: Array.isArray(parsedStructure)
? parsedStructure
: [];
await updateProjectData({
config: { structure: chosenStructure },
selections: {
@@ -1,12 +1,12 @@
import { View, StyleSheet, Image, Platform, Text } from "react-native";
import React, { useMemo, useState, useCallback, useEffect } from "react";
import Animated, { useAnimatedRef } from "react-native-reanimated";
import { BlurView } from "expo-blur";
import CreateLyricsHeader from "./components/CreateLyricsHeader";
import { Palette, Style } from "../../styles";
import { FONT_FAMILY } from "../../styles/Fonts";
import React, { useEffect, useMemo, useState } from "react";
import { Image, Platform, StyleSheet, Text, View } from "react-native";
import Animated, { useAnimatedRef } from "react-native-reanimated";
import Sortable from "react-native-sortables";
import { icons } from "../../assets";
import { Palette, Style } from "../../styles";
import { FONT_FAMILY } from "../../styles/Fonts";
import CreateLyricsHeader from "./components/CreateLyricsHeader";
// baseStructure: array like ['couplet','refrain',...]
// onChange: callback that receives array like ['couplet','refrain',...]
+5 -5
View File
@@ -1,13 +1,13 @@
import { View, Image, StyleSheet } from "react-native";
import React from "react";
import Page from "../../layouts/Page";
import { Image, StyleSheet, View } from "react-native";
import { ai } from "../../assets";
import MusicLandHeader from "../../components/MusicLandHeader";
import { goBack, navigate } from "../../navigation/NavigationService";
import { gutters } from "../../styles";
import BorderGradientButton from "../../components/BorderGradientButton";
import GradientButton from "../../components/GradientButton";
import MusicLandHeader from "../../components/MusicLandHeader";
import Page from "../../layouts/Page";
import { Routes } from "../../navigation";
import { goBack, navigate } from "../../navigation/NavigationService";
import { gutters } from "../../styles";
const FinishedWriting = () => {
return (
+7 -1
View File
@@ -237,7 +237,13 @@ const Lyrics = ({ navigation }) => {
.doc(selectedProjectId)
.set(updateData, { merge: true });
}
navigate(Routes.Home);
navigate(Routes.BottomTab, {
screen: Routes.HomeStack,
params: {
screen: Routes.Home,
params: { showLyricsCongrats: true },
},
});
} catch (e) {
console.log(e);
alertMessage("Erreur", "Échec de l'enregistrement dans le projet.");