mirror of
https://github.com/streamyfin/streamyfin.git
synced 2025-08-20 18:37:18 +02:00
36 lines
850 B
TypeScript
36 lines
850 B
TypeScript
import { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
|
|
import { useRouter } from "expo-router";
|
|
import { View, ViewProps } from "react-native";
|
|
import { SongsListItem } from "./SongsListItem";
|
|
|
|
interface Props extends ViewProps {
|
|
songs?: BaseItemDto[] | null;
|
|
collectionId: string;
|
|
artistId: string;
|
|
albumId: string;
|
|
}
|
|
|
|
export const SongsList: React.FC<Props> = ({
|
|
collectionId,
|
|
artistId,
|
|
albumId,
|
|
songs = [],
|
|
...props
|
|
}) => {
|
|
const router = useRouter();
|
|
return (
|
|
<View className="flex flex-col space-y-2" {...props}>
|
|
{songs?.map((item: BaseItemDto, index: number) => (
|
|
<SongsListItem
|
|
key={item.Id}
|
|
item={item}
|
|
index={index}
|
|
collectionId={collectionId}
|
|
artistId={artistId}
|
|
albumId={albumId}
|
|
/>
|
|
))}
|
|
</View>
|
|
);
|
|
};
|