hit parade

This commit is contained in:
2025-08-29 15:05:02 +02:00
parent 96641cf4be
commit 77b8fe6721
+3 -3
View File
@@ -16,8 +16,8 @@ import SongCard from "./components/SongCard";
const HitParade = () => {
const [selected, setSelected] = useState("Chansons");
const { data: latestSongs } = useDataFromRef({
ref: projectsRef.orderBy("createdAt", "desc").limit(10),
const { data: topSongs } = useDataFromRef({
ref: projectsRef.where("views", ">", 0).orderBy("views", "desc").limit(10),
simpleRef: false,
listener: true,
condition: true,
@@ -90,7 +90,7 @@ const HitParade = () => {
gap: 10,
paddingBottom: responsiveHeight(20),
}}
data={Array.isArray(latestSongs) ? latestSongs : []}
data={Array.isArray(topSongs) ? topSongs : []}
keyExtractor={(item) => item.id}
renderItem={({ item, index }) => (
<SongCard