diff --git a/components/Artists/component.tsx b/components/Artists/component.tsx index 43f5801c..bc86595a 100644 --- a/components/Artists/component.tsx +++ b/components/Artists/component.tsx @@ -22,7 +22,7 @@ export default function Artists({ QueryKeys.RecentlyPlayedArtists ? useQuery({ queryKey: [QueryKeys.RecentlyPlayedArtists], - queryFn: () => fetchRecentlyPlayedArtists() + queryFn: () => fetchRecentlyPlayedArtists(20) }) : useQuery({ diff --git a/components/Global/component.config.ts b/components/Global/component.config.ts index 2e311006..1b7aca75 100644 --- a/components/Global/component.config.ts +++ b/components/Global/component.config.ts @@ -7,6 +7,4 @@ export const cardDimensions = { width: 150, height: 150 } -} - -export const horizontalCardLimit = 20 \ No newline at end of file +} \ No newline at end of file diff --git a/components/Global/components/horizontal-list.tsx b/components/Global/components/horizontal-list.tsx index 6db856cb..bf3d8d18 100644 --- a/components/Global/components/horizontal-list.tsx +++ b/components/Global/components/horizontal-list.tsx @@ -2,7 +2,6 @@ import { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models/base-item import React from "react"; import { FlatList, FlatListProps, ListRenderItem } from "react-native"; import IconCard from "../helpers/icon-card"; -import { horizontalCardLimit } from "../component.config"; interface HorizontalCardListProps extends FlatListProps { squared?: boolean | undefined; @@ -21,7 +20,6 @@ interface HorizontalCardListProps extends FlatListProps { * @returns */ export default function HorizontalCardList({ - cutoff = horizontalCardLimit, onSeeMore, squared = false, ...props @@ -30,7 +28,7 @@ export default function HorizontalCardList({ return ( | undefined)?.slice(0, cutoff - 1) ?? undefined} + data={props.data} renderItem={props.renderItem} ListFooterComponent={() => { return props.data ? ( diff --git a/components/Tracks/screen.tsx b/components/Tracks/screen.tsx index 6c292712..8992d820 100644 --- a/components/Tracks/screen.tsx +++ b/components/Tracks/screen.tsx @@ -6,6 +6,7 @@ import { QueryKeys } from "../../enums/query-keys"; import { fetchRecentlyPlayed } from "../../api/queries/functions/recents"; import { fetchFavoriteTracks } from "../../api/queries/functions/favorites"; import { useQuery } from "@tanstack/react-query"; +import { Separator } from "tamagui"; export default function TracksScreen({ route, @@ -14,13 +15,14 @@ export default function TracksScreen({ const { data: tracks, refetch, isPending } = useQuery({ queryKey: [route.params.query], queryFn: () => route.params.query === QueryKeys.RecentlyPlayed - ? fetchRecentlyPlayed() + ? fetchRecentlyPlayed(20) : fetchFavoriteTracks() }); return ( } numColumns={1} data={tracks} refreshControl={