From 1cb92f9161e8a614cc84a1a71ccd391db342568a Mon Sep 17 00:00:00 2001 From: leon-morival Date: Fri, 3 Oct 2025 15:57:00 +0200 Subject: [PATCH] create from library --- src/screens/Library/components/BackTracks.js | 1 + .../Library/components/CardContainer.js | 18 ++++++++++++------ src/screens/Library/components/LikedMusic.js | 1 + src/screens/Library/components/MyMusic.js | 1 + src/screens/Library/components/MyPlaylist.js | 6 ++++++ src/screens/Login.js | 2 +- 6 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/screens/Library/components/BackTracks.js b/src/screens/Library/components/BackTracks.js index 22a3865..33c7e0d 100644 --- a/src/screens/Library/components/BackTracks.js +++ b/src/screens/Library/components/BackTracks.js @@ -37,6 +37,7 @@ const BackTracks = () => { liked: false, }) } + onPressPlus={() => navigate(Routes.WritingLyrics)} > {items.length > 0 && ( diff --git a/src/screens/Library/components/CardContainer.js b/src/screens/Library/components/CardContainer.js index 6ebb9ef..3f29f42 100644 --- a/src/screens/Library/components/CardContainer.js +++ b/src/screens/Library/components/CardContainer.js @@ -1,16 +1,22 @@ -import { View, Text, StyleSheet, Pressable } from "react-native"; import React from "react"; +import { Image, Pressable, StyleSheet, Text, View } from "react-native"; +import { icons } from "../../../assets"; import { Palette, Style } from "../../../styles"; import { FONT_FAMILY } from "../../../styles/Fonts"; - -const CardContainer = ({ children, label = "", onPress }) => { +const CardContainer = ({ children, label = "", onPress, onPressPlus }) => { return ( {label} - - Voir tout - + + + + + + + Voir tout + + {children} diff --git a/src/screens/Library/components/LikedMusic.js b/src/screens/Library/components/LikedMusic.js index f5a6956..e31f879 100644 --- a/src/screens/Library/components/LikedMusic.js +++ b/src/screens/Library/components/LikedMusic.js @@ -38,6 +38,7 @@ const LikedMusic = () => { liked: true, }) } + onPressPlus={() => navigate(Routes.WritingLyrics)} > setContainerWidth(e.nativeEvent.layout.width)} diff --git a/src/screens/Library/components/MyMusic.js b/src/screens/Library/components/MyMusic.js index 53121a9..93d2f44 100644 --- a/src/screens/Library/components/MyMusic.js +++ b/src/screens/Library/components/MyMusic.js @@ -30,6 +30,7 @@ const MyMusic = () => { liked: false, }) } + onPressPlus={() => navigate(Routes.WritingLyrics)} > {Array.isArray(projects) && diff --git a/src/screens/Library/components/MyPlaylist.js b/src/screens/Library/components/MyPlaylist.js index b8f25c3..615625a 100644 --- a/src/screens/Library/components/MyPlaylist.js +++ b/src/screens/Library/components/MyPlaylist.js @@ -1,6 +1,7 @@ import { BlurView } from "expo-blur"; import React from "react"; import { Image, Platform, Pressable, Text, View } from "react-native"; +import { SheetManager } from "react-native-actions-sheet"; import { icons } from "../../../assets"; import useLayoutType from "../../../hooks/useLayoutType"; import { Routes } from "../../../navigation"; @@ -20,6 +21,11 @@ const MyPlaylist = () => { navigate(Routes.AllMyPlaylist)} + onPressPlus={() => + SheetManager.show("Playlist", { + payload: { startAtCreate: true }, + }) + } > {playlists.map((item) => ( diff --git a/src/screens/Login.js b/src/screens/Login.js index b14fcda..126b367 100644 --- a/src/screens/Login.js +++ b/src/screens/Login.js @@ -178,7 +178,7 @@ export default ({ navigation }) => { alignItems: "center", }} > - +