move cover flow

This commit is contained in:
2025-10-13 15:21:31 +02:00
parent 63629017d7
commit d8e0c78ef5
6 changed files with 24 additions and 65 deletions
@@ -34,12 +34,6 @@ const STAGE_CARD_CONTENT = [
description: "Come back, when you'll have lyrics!",
image: ai.rightIcon,
},
{
key: "designer",
title: "Bena",
description: "Come back when you want to generate cover!",
image: ai.leftIcon,
},
{
key: "director",
title: "John",
@@ -33,12 +33,6 @@ const STAGE_CARD_CONTENT = [
description: "Come back, when you'll have lyrics!",
image: ai.rightIcon,
},
{
key: "designer",
title: "Bena",
description: "Come back when you want to generate cover!",
image: ai.leftIcon,
},
{
key: "director",
title: "John",
@@ -1,4 +1,11 @@
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { BlurView } from "expo-blur";
import React, {
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from "react";
import {
Animated,
Dimensions,
@@ -10,7 +17,6 @@ import {
Text,
View,
} from "react-native";
import { BlurView } from "expo-blur";
import { icons, img } from "../../assets";
import { Palette } from "../../styles";
import { FONT_FAMILY } from "../../styles/Fonts";
@@ -85,7 +91,7 @@ const ProjectDropDown = ({
onSelectProject?.(project);
closeDropdown();
},
[closeDropdown, onSelectProject],
[closeDropdown, onSelectProject]
);
const handleModify = useCallback(
@@ -93,7 +99,7 @@ const ProjectDropDown = ({
if (!project?.id) return;
onModifyProject?.(project, anchor);
},
[onModifyProject],
[onModifyProject]
);
const handleCreate = useCallback(() => {
@@ -103,7 +109,7 @@ const ProjectDropDown = ({
const dropdownWidth = useMemo(
() => triggerLayout?.width || 0,
[triggerLayout],
[triggerLayout]
);
useEffect(() => {
@@ -121,7 +127,7 @@ const ProjectDropDown = ({
inputRange: [0, 1],
outputRange: [-12, 0],
}),
[dropdownAnimation],
[dropdownAnimation]
);
const overlayScale = useMemo(
@@ -130,7 +136,7 @@ const ProjectDropDown = ({
inputRange: [0, 1],
outputRange: [0.96, 1],
}),
[dropdownAnimation],
[dropdownAnimation]
);
const triggerOpacity = useMemo(
@@ -140,7 +146,7 @@ const ProjectDropDown = ({
outputRange: [1, 0],
extrapolate: "clamp",
}),
[dropdownAnimation],
[dropdownAnimation]
);
const triggerTranslateY = useMemo(
@@ -149,7 +155,7 @@ const ProjectDropDown = ({
inputRange: [0, 1],
outputRange: [0, -6],
}),
[dropdownAnimation],
[dropdownAnimation]
);
return (
@@ -309,7 +315,7 @@ const ProjectRow = ({
(typeof project?.cover === "string" ? project.cover : project?.cover?.uri);
const imageSource = useMemo(
() => (coverUri ? { uri: coverUri } : img.placeholder),
[coverUri],
[coverUri]
);
const title =
project?.title || (isEmptyProject ? "Nouvelle musique" : "Sans titre");