import React, { useState } from "react"; import { FlatList, Image, Pressable, Text, View } from "react-native"; import { responsiveHeight } from "react-native-responsive-dimensions"; import { background, icons } from "../../assets"; import BorderGradientButton from "../../components/BorderGradientButton"; import { projectsRef } from "../../config/firebase"; import useDataFromRef from "../../hooks/useDataFromRef"; import Page from "../../layouts/Page"; import { Routes } from "../../navigation"; import { navigate } from "../../navigation/NavigationService"; import { Palette, Style } from "../../styles"; import { FONT_FAMILY } from "../../styles/Fonts"; import CreateLyricsHeader from "../Writing/components/CreateLyricsHeader"; import PlaybacksCard from "./components/PlaybacksCard"; import SongCard from "./components/SongCard"; const HitParade = () => { const [selected, setSelected] = useState("Chansons"); const { data: topSongs } = useDataFromRef({ ref: projectsRef.where("views", ">", 0).orderBy("views", "desc").limit(10), simpleRef: false, listener: true, condition: true, }); return ( Coups de coeur des utilisateurs catégorie Playbacks Les 3 Playbacks les plus likées du mois reçoivent des{"\n"} tokens. {["Chansons", "Playbacks", "Clips"].map((item, index) => ( setSelected(item)} tint={selected === item ? "light" : "dark"} containerStyle={{ width: 100, }} titleStyle={{ fontSize: 16, fontFamily: FONT_FAMILY.HelveticaNeueBold, }} /> ))} {selected === "Chansons" && ( item.id} renderItem={({ item, index }) => ( navigate(Routes.MusicDetails, { projectId: item.id }) } /> )} /> )} {selected === "Playbacks" && ( } /> )} {selected === "Clips" && ( } /> )} ); }; export default HitParade;