refactor: rename product to partyEvent in frontend components and views

This commit is contained in:
louiscklaw
2025-06-15 18:06:17 +08:00
parent 4c2a06585d
commit ae39b7ca67
7 changed files with 18 additions and 18 deletions

View File

@@ -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={{