mirror of
https://github.com/vercel/commerce.git
synced 2025-07-26 03:31:23 +00:00
✨ feat: Checkout Page
:%s
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { CardItemCheckoutProps } from "src/components/common/CardItemCheckout/CardItemCheckout"
|
||||
import { RecipeCardProps } from "src/components/common/RecipeCard/RecipeCard"
|
||||
|
||||
export const PRODUCT_DATA_TEST = [
|
||||
@@ -212,4 +213,34 @@ export const RECIPE_DATA_TEST: RecipeCardProps[] = [
|
||||
description: "The broth for Bun Bo Hue is prepared by slowly simmering various types of beef and pork bones (ox tail, beef shank, pork neck bones, pork feet,...",
|
||||
imageSrc: 'https://user-images.githubusercontent.com/76729908/132159262-f28a9fb9-4852-47e6-80b5-d600521b548a.png'
|
||||
},
|
||||
]
|
||||
]
|
||||
|
||||
export const CHECKOUT_BILL_DATA:CardItemCheckoutProps[] = [
|
||||
{
|
||||
name: 'Tomato',
|
||||
slug: "tomato",
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646227-b5705e64-3b45-47a3-9433-9f4b5ee8d40c.png",
|
||||
quantity:10
|
||||
},
|
||||
{
|
||||
name: 'Carrot',
|
||||
slug: "carrot",
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646217-23b86160-45c9-4845-8dcc-b3e1a4483edd.png",
|
||||
quantity:1
|
||||
},
|
||||
{
|
||||
name: 'Salad',
|
||||
slug:"salad",
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646221-aaa1d48d-bb80-470f-9400-ae2aa47285b6.png",
|
||||
quantity:2
|
||||
},
|
||||
]
|
@@ -1,3 +1,11 @@
|
||||
export function isMobile() {
|
||||
return window.innerWidth <= 768
|
||||
}
|
||||
|
||||
export function removeItem<T>(arr: Array<T>, value: T): Array<T> {
|
||||
const index = arr.indexOf(value);
|
||||
if (index > -1) {
|
||||
arr.splice(index, 1);
|
||||
}
|
||||
return [...arr];
|
||||
}
|
Reference in New Issue
Block a user