hit parade
This commit is contained in:
@@ -16,8 +16,8 @@ import SongCard from "./components/SongCard";
|
|||||||
|
|
||||||
const HitParade = () => {
|
const HitParade = () => {
|
||||||
const [selected, setSelected] = useState("Chansons");
|
const [selected, setSelected] = useState("Chansons");
|
||||||
const { data: latestSongs } = useDataFromRef({
|
const { data: topSongs } = useDataFromRef({
|
||||||
ref: projectsRef.orderBy("createdAt", "desc").limit(10),
|
ref: projectsRef.where("views", ">", 0).orderBy("views", "desc").limit(10),
|
||||||
simpleRef: false,
|
simpleRef: false,
|
||||||
listener: true,
|
listener: true,
|
||||||
condition: true,
|
condition: true,
|
||||||
@@ -90,7 +90,7 @@ const HitParade = () => {
|
|||||||
gap: 10,
|
gap: 10,
|
||||||
paddingBottom: responsiveHeight(20),
|
paddingBottom: responsiveHeight(20),
|
||||||
}}
|
}}
|
||||||
data={Array.isArray(latestSongs) ? latestSongs : []}
|
data={Array.isArray(topSongs) ? topSongs : []}
|
||||||
keyExtractor={(item) => item.id}
|
keyExtractor={(item) => item.id}
|
||||||
renderItem={({ item, index }) => (
|
renderItem={({ item, index }) => (
|
||||||
<SongCard
|
<SongCard
|
||||||
|
|||||||
Reference in New Issue
Block a user