mirror of
https://github.com/anultravioletaurora/Jellify.git
synced 2026-01-07 06:11:57 -06:00
smol fixes
This commit is contained in:
@@ -22,7 +22,7 @@ export default function Artists({
|
||||
|
||||
QueryKeys.RecentlyPlayedArtists ? useQuery({
|
||||
queryKey: [QueryKeys.RecentlyPlayedArtists],
|
||||
queryFn: () => fetchRecentlyPlayedArtists()
|
||||
queryFn: () => fetchRecentlyPlayedArtists(20)
|
||||
}) :
|
||||
|
||||
useQuery({
|
||||
|
||||
@@ -7,6 +7,4 @@ export const cardDimensions = {
|
||||
width: 150,
|
||||
height: 150
|
||||
}
|
||||
}
|
||||
|
||||
export const horizontalCardLimit = 20
|
||||
}
|
||||
@@ -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<BaseItemDto> {
|
||||
squared?: boolean | undefined;
|
||||
@@ -21,7 +20,6 @@ interface HorizontalCardListProps extends FlatListProps<BaseItemDto> {
|
||||
* @returns
|
||||
*/
|
||||
export default function HorizontalCardList({
|
||||
cutoff = horizontalCardLimit,
|
||||
onSeeMore,
|
||||
squared = false,
|
||||
...props
|
||||
@@ -30,7 +28,7 @@ export default function HorizontalCardList({
|
||||
return (
|
||||
<FlatList
|
||||
horizontal
|
||||
data={(props.data as Array<BaseItemDto> | undefined)?.slice(0, cutoff - 1) ?? undefined}
|
||||
data={props.data}
|
||||
renderItem={props.renderItem}
|
||||
ListFooterComponent={() => {
|
||||
return props.data ? (
|
||||
|
||||
@@ -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 (
|
||||
<FlatList
|
||||
contentInsetAdjustmentBehavior="automatic"
|
||||
ItemSeparatorComponent={() => <Separator />}
|
||||
numColumns={1}
|
||||
data={tracks}
|
||||
refreshControl={
|
||||
|
||||
Reference in New Issue
Block a user