refactor: rename product to partyEvent in frontend components and views
This commit is contained in:
@@ -10,18 +10,18 @@ import { ProductItemSkeleton } from './party-event-skeleton';
|
||||
|
||||
type Props = BoxProps & {
|
||||
loading?: boolean;
|
||||
products: IPartyEventItem[];
|
||||
partyEvents: IPartyEventItem[];
|
||||
};
|
||||
|
||||
export function PartyEventList({ products, loading, sx, ...other }: Props) {
|
||||
export function PartyEventList({ partyEvents, loading, sx, ...other }: Props) {
|
||||
const renderLoading = () => <ProductItemSkeleton />;
|
||||
|
||||
const renderList = () =>
|
||||
products.map((product) => (
|
||||
partyEvents.map((partyEvent) => (
|
||||
<ProductItem
|
||||
key={product.id}
|
||||
product={product}
|
||||
detailsHref={paths.product.details(product.id)}
|
||||
key={partyEvent.id}
|
||||
partyEvent={partyEvent}
|
||||
detailsHref={paths.partyEvent.details(partyEvent.id)}
|
||||
/>
|
||||
));
|
||||
|
||||
@@ -46,7 +46,7 @@ export function PartyEventList({ products, loading, sx, ...other }: Props) {
|
||||
{loading ? renderLoading() : renderList()}
|
||||
</Box>
|
||||
|
||||
{products.length > 8 && (
|
||||
{partyEvents.length > 8 && (
|
||||
<Pagination
|
||||
count={8}
|
||||
sx={{
|
||||
|
Reference in New Issue
Block a user