hit parade
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user