chore: transfer repo
This commit is contained in:
21
components/build-box/BuildBoxCustomizePage.tsx
Normal file
21
components/build-box/BuildBoxCustomizePage.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { getBoxProducts } from "lib/shopify";
|
||||
import { BoxOption } from "./BuildBoxCustomizeClient";
|
||||
import { BuildBoxCustomizePageContent } from "./client/BuildBoxCustomizePageContent";
|
||||
|
||||
export async function BuildBoxCustomizePage() {
|
||||
// Fetch boxes from the API
|
||||
const boxes = await getBoxProducts({
|
||||
sortKey: 'CREATED_AT',
|
||||
reverse: true
|
||||
});
|
||||
|
||||
// Convert products to box options for display
|
||||
const boxOptions: BoxOption[] = boxes.map(box => ({
|
||||
id: box.id,
|
||||
title: box.title,
|
||||
price: parseFloat(box.priceRange.minVariantPrice.amount),
|
||||
image: box.featuredImage?.url || '/placeholder-box.jpg'
|
||||
}));
|
||||
|
||||
return <BuildBoxCustomizePageContent boxes={boxOptions} />;
|
||||
}
|
||||
Reference in New Issue
Block a user