1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/src/components/cardbuilder/Card/Cards.tsx
2024-03-03 01:31:35 +03:00

24 lines
631 B
TypeScript

import React, { type FC } from 'react';
import { setCardData } from '../cardBuilder';
import Card from './Card';
import type { ItemDto } from 'types/base/models/item-dto';
import type { CardOptions } from 'types/cardOptions';
import '../card.scss';
interface CardsProps {
items: ItemDto[];
cardOptions: CardOptions;
}
const Cards: FC<CardsProps> = ({ items, cardOptions }) => {
setCardData(items, cardOptions);
const renderCards = () =>
items.map((item) => (
<Card key={item.Id} item={item} cardOptions={cardOptions} />
));
return <>{renderCards()}</>;
};
export default Cards;