import type { BoxProps } from '@mui/material/Box'; import Box from '@mui/material/Box'; import Pagination, { paginationClasses } from '@mui/material/Pagination'; import { paths } from 'src/routes/paths'; import type { IPartyEventItem } from 'src/types/party-event'; import { ProductItem } from './party-event-item'; import { ProductItemSkeleton } from './party-event-skeleton'; // ---------------------------------------------------------------------- type Props = BoxProps & { loading?: boolean; partyEvents: IPartyEventItem[]; }; export function PartyEventList({ partyEvents, loading, sx, ...other }: Props) { const renderLoading = () => ; const renderList = () => partyEvents.map((partyEvent) => ( )); return ( <> ({ gap: 3, display: 'grid', gridTemplateColumns: { xs: 'repeat(1, 1fr)', sm: 'repeat(2, 1fr)', md: 'repeat(3, 1fr)', lg: 'repeat(4, 1fr)', }, }), ...(Array.isArray(sx) ? sx : [sx]), ]} {...other} > {loading ? renderLoading() : renderList()} {partyEvents.length > 8 && ( )} ); }