Skip to content

Commit 4975435

Browse files
Cleanup Store checkout (#270)
* Cleanup Store checkout * Check the correct member lists for discount eligibility * Update src/app/(membership)/merch/page.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Address coderabbit comments --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent e24134b commit 4975435

File tree

2 files changed

+348
-232
lines changed

2 files changed

+348
-232
lines changed

src/app/(membership)/merch-store/transform.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ interface ApiVariant {
33
name: string;
44
description?: string;
55
imageUrl?: string;
6-
memberLists: string[];
6+
memberLists?: string[];
77
inventoryCount?: number | null;
88
exchangesAllowed: boolean;
99
memberPriceCents: number;
@@ -95,7 +95,8 @@ export function transformApiResponse(apiResponse: ApiResponse): LegacyItem[] {
9595
sizes: product.variants.map((v) => v.name),
9696
variants: product.variants.map(v => ({
9797
id: v.variantId,
98-
name: v.name
98+
name: v.name,
99+
memberLists: v.memberLists ?? []
99100
})),
100101
eventDetails: product.description ?? "",
101102
total_sold: {}, // API doesn't provide this; initialize empty

0 commit comments

Comments
 (0)