enregistrer
This commit is contained in:
@@ -20,15 +20,14 @@ const Playback = ({ route }) => {
|
||||
|
||||
const onPressRecord = useCallback(async () => {
|
||||
try {
|
||||
// If we lack required fields, skip generation but continue UX
|
||||
if (!projectId || songIndex === undefined || !sunoTaskId) {
|
||||
console.log("Missing data for timestamp generation", {
|
||||
projectId,
|
||||
songIndex,
|
||||
sunoTaskId,
|
||||
});
|
||||
return;
|
||||
// return navigate(Routes.RecordPlayback, { project });
|
||||
}
|
||||
if (project.musicTimeStamps.songIndex) {
|
||||
console.log("exists");
|
||||
return navigate(Routes.RecordPlayback, { project });
|
||||
}
|
||||
|
||||
await setIsLoading(true);
|
||||
const callable = firebase
|
||||
@@ -59,7 +58,6 @@ const Playback = ({ route }) => {
|
||||
}
|
||||
}, [projectId, songIndex, sunoTaskId, project]);
|
||||
|
||||
console.log("Playback render", { projectId, songIndex, sunoTaskId });
|
||||
return (
|
||||
<Page headerType="NONE" backgroundImg={background.playbackBG2}>
|
||||
<Image source={ai.john} style={styles.img} resizeMode="contain" />
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useFocusEffect } from "@react-navigation/native";
|
||||
import { useAudioPlayer } from "expo-audio";
|
||||
import { CameraView, useCameraPermissions } from "expo-camera";
|
||||
import React, { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { Text, View } from "react-native";
|
||||
import { Platform, Text, View } from "react-native";
|
||||
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||
import Svg, { Circle } from "react-native-svg";
|
||||
import GradientButton from "../../components/GradientButton";
|
||||
@@ -298,7 +298,10 @@ const RecordPlayback = ({ route }) => {
|
||||
<MusicLandHeader progress={9} onPressBack={goBack} />
|
||||
|
||||
<View style={{ flex: 1, marginTop: 11 }}>
|
||||
<CreateLyricsHeader>
|
||||
<CreateLyricsHeader
|
||||
disableBlur={Platform.OS !== "ios"}
|
||||
containerStyle={{ backgroundColor: Palette.ultraLightBlack }}
|
||||
>
|
||||
<Text
|
||||
style={{
|
||||
fontSize: 16,
|
||||
|
||||
@@ -18,6 +18,7 @@ const CreateLyricsHeader = ({
|
||||
onPress,
|
||||
blurViewStyle = {},
|
||||
showBorder = true,
|
||||
disableBlur = false,
|
||||
}) => {
|
||||
const [onLayout, setOnLayout] = useState(null);
|
||||
const { isWeb } = useLayoutType();
|
||||
@@ -56,6 +57,40 @@ const CreateLyricsHeader = ({
|
||||
setOnLayout(event.nativeEvent.layout);
|
||||
}}
|
||||
>
|
||||
{disableBlur ? (
|
||||
<View
|
||||
style={{
|
||||
paddingHorizontal: 12,
|
||||
paddingVertical: 8,
|
||||
gap: 4,
|
||||
...blurViewStyle,
|
||||
}}
|
||||
>
|
||||
{title && (
|
||||
<Text
|
||||
style={{
|
||||
fontSize: 22,
|
||||
color: Palette.white,
|
||||
fontFamily: FONT_FAMILY.InterSemiBold,
|
||||
}}
|
||||
>
|
||||
{title}
|
||||
</Text>
|
||||
)}
|
||||
{subTitle && (
|
||||
<Text
|
||||
style={{
|
||||
fontSize: 12,
|
||||
color: Palette.white,
|
||||
fontFamily: FONT_FAMILY.InterRegular,
|
||||
}}
|
||||
>
|
||||
{subTitle}
|
||||
</Text>
|
||||
)}
|
||||
{children}
|
||||
</View>
|
||||
) : (
|
||||
<BlurView
|
||||
intensity={intensity}
|
||||
tint={tint}
|
||||
@@ -93,6 +128,7 @@ const CreateLyricsHeader = ({
|
||||
)}
|
||||
{children}
|
||||
</BlurView>
|
||||
)}
|
||||
</View>
|
||||
</Pressable>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user