mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Merge branch 'common' of github.com:KieIO/grocery-vercel-commerce into m4-datnguyen
This commit is contained in:
@@ -8,9 +8,11 @@ export const SOCIAL_LINKS = {
|
||||
export const ROUTE = {
|
||||
HOME: '/',
|
||||
PRODUCTS: '/products',
|
||||
PRODUCT_DETAIL: '/product',
|
||||
ABOUT: '/about',
|
||||
BLOG_DETAIL: '/blog',
|
||||
ACCOUNT: '/account',
|
||||
|
||||
RECIPES: '/recipes',
|
||||
BUSSINESS: '/bussiness',
|
||||
CONTACT: '/contact',
|
||||
FAQ: '/faq',
|
||||
@@ -31,7 +33,9 @@ export const QUERY_KEY = {
|
||||
TAB: 'tab',
|
||||
CATEGORY: 'category',
|
||||
BRAND: 'brand',
|
||||
FEATURED: 'feature'
|
||||
FEATURED: 'feature',
|
||||
SORTBY:'sortby',
|
||||
RECIPES:'recipes'
|
||||
}
|
||||
|
||||
export enum ProductFeature {
|
||||
@@ -39,10 +43,11 @@ export enum ProductFeature {
|
||||
Sales = 'Sales',
|
||||
NewItem = 'New Item',
|
||||
Viewed = 'Viewed',
|
||||
|
||||
}
|
||||
|
||||
export const KEY = {
|
||||
ENTER: 'Enter',
|
||||
}
|
||||
|
||||
export const OPTION_ALL = 'all';
|
||||
export const DEFAULT_PAGE_SIZE=20
|
215
src/utils/demo-data.ts
Normal file
215
src/utils/demo-data.ts
Normal file
@@ -0,0 +1,215 @@
|
||||
import { RecipeCardProps } from "src/components/common/RecipeCard/RecipeCard"
|
||||
|
||||
export const PRODUCT_DATA_TEST = [
|
||||
{
|
||||
name: 'Tomato',
|
||||
slug: 'tomato',
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646211-d56b77ac-83f1-4dd2-b55c-e3f1e0ba4e49.png",
|
||||
},
|
||||
{
|
||||
name: 'Cucumber',
|
||||
slug: 'tomato',
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646211-d56b77ac-83f1-4dd2-b55c-e3f1e0ba4e49.png",
|
||||
},
|
||||
{
|
||||
name: 'Carrot',
|
||||
slug: 'tomato',
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646217-23b86160-45c9-4845-8dcc-b3e1a4483edd.png",
|
||||
},
|
||||
{
|
||||
name: 'Salad',
|
||||
slug: 'tomato',
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646221-aaa1d48d-bb80-470f-9400-ae2aa47285b6.png",
|
||||
},
|
||||
{
|
||||
name: 'Tomato',
|
||||
slug: 'tomato',
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646224-d22dc2e4-6ae8-4bbe-adcf-491ce191f09b.png",
|
||||
},
|
||||
{
|
||||
name: 'Cucumber',
|
||||
slug: 'tomato',
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646225-2728f192-481b-4142-99b0-dde92f53c6c6.png",
|
||||
},
|
||||
{
|
||||
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",
|
||||
},
|
||||
{
|
||||
name: 'Cucumber',
|
||||
slug: 'tomato',
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646231-2d1c3ad1-4f5b-4a8e-9874-ca731f4ce128.png",
|
||||
},
|
||||
]
|
||||
|
||||
export const PRODUCT_CART_DATA_TEST = [
|
||||
{
|
||||
name: 'Tomato',
|
||||
slug: 'tomato',
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646211-d56b77ac-83f1-4dd2-b55c-e3f1e0ba4e49.png",
|
||||
oldPrice: 'Rp 32.000',
|
||||
discount: '15%',
|
||||
quantity: 1,
|
||||
},
|
||||
{
|
||||
name: 'Cucumber',
|
||||
slug: 'tomato',
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646211-d56b77ac-83f1-4dd2-b55c-e3f1e0ba4e49.png",
|
||||
oldPrice: 'Rp 32.000',
|
||||
discount: '15%',
|
||||
quantity: 2,
|
||||
},
|
||||
{
|
||||
name: 'Carrot',
|
||||
slug: 'tomato',
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646217-23b86160-45c9-4845-8dcc-b3e1a4483edd.png",
|
||||
oldPrice: 'Rp 32.000',
|
||||
discount: '20%',
|
||||
quantity: 3,
|
||||
},
|
||||
{
|
||||
name: 'Salad',
|
||||
slug: 'tomato',
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646221-aaa1d48d-bb80-470f-9400-ae2aa47285b6.png",
|
||||
quantity: 1,
|
||||
},
|
||||
]
|
||||
|
||||
export const INGREDIENT_DATA_TEST = [
|
||||
{
|
||||
name: 'Tomato',
|
||||
slug: 'tomato',
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646211-d56b77ac-83f1-4dd2-b55c-e3f1e0ba4e49.png",
|
||||
},
|
||||
{
|
||||
name: 'Cucumber',
|
||||
slug: 'tomato',
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646211-d56b77ac-83f1-4dd2-b55c-e3f1e0ba4e49.png",
|
||||
isNotSell: true,
|
||||
},
|
||||
{
|
||||
name: 'Carrot',
|
||||
slug: 'tomato',
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646217-23b86160-45c9-4845-8dcc-b3e1a4483edd.png",
|
||||
},
|
||||
{
|
||||
name: 'Salad',
|
||||
slug: 'tomato',
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646221-aaa1d48d-bb80-470f-9400-ae2aa47285b6.png",
|
||||
isNotSell: true,
|
||||
},
|
||||
{
|
||||
name: 'Tomato',
|
||||
slug: 'tomato',
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646224-d22dc2e4-6ae8-4bbe-adcf-491ce191f09b.png",
|
||||
},
|
||||
{
|
||||
name: 'Cucumber',
|
||||
slug: 'tomato',
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646225-2728f192-481b-4142-99b0-dde92f53c6c6.png",
|
||||
},
|
||||
{
|
||||
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",
|
||||
},
|
||||
{
|
||||
name: 'Cucumber',
|
||||
slug: 'tomato',
|
||||
weight: '250g',
|
||||
category: 'VEGGIE',
|
||||
price: 'Rp 27.500',
|
||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646231-2d1c3ad1-4f5b-4a8e-9874-ca731f4ce128.png",
|
||||
},
|
||||
]
|
||||
|
||||
export const RECIPE_DATA_TEST: RecipeCardProps[] = [
|
||||
{
|
||||
title: "Special Recipe of Vietnamese Phở",
|
||||
description: "Alright, before we get to the actual recipe, let’s chat for a sec about the ingredients. To make this pho soup recipe, you will need:",
|
||||
imageSrc: 'https://user-images.githubusercontent.com/76729908/132159257-f92574c7-d00d-4142-8ea7-0ca9515fb737.png'
|
||||
},
|
||||
{
|
||||
title: "Original Recipe of Curry",
|
||||
description: "Chicken curry is common to several countries including India, countries in Asia and the Caribbean. My favorite of them though is this aromatic Indian...",
|
||||
imageSrc: 'https://user-images.githubusercontent.com/76729908/132159259-ae4c986d-ab53-4758-9137-d06bafdd15d0.png'
|
||||
},
|
||||
{
|
||||
title: "The Best Recipe of Beef Noodle Soup",
|
||||
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'
|
||||
},
|
||||
{
|
||||
title: "Special Recipe of Vietnamese Phở",
|
||||
description: "Alright, before we get to the actual recipe, let’s chat for a sec about the ingredients. To make this pho soup recipe, you will need:",
|
||||
imageSrc: 'https://user-images.githubusercontent.com/76729908/132159257-f92574c7-d00d-4142-8ea7-0ca9515fb737.png'
|
||||
},
|
||||
{
|
||||
title: "Original Recipe of Curry",
|
||||
description: "Chicken curry is common to several countries including India, countries in Asia and the Caribbean. My favorite of them though is this aromatic Indian...",
|
||||
imageSrc: 'https://user-images.githubusercontent.com/76729908/132159259-ae4c986d-ab53-4758-9137-d06bafdd15d0.png'
|
||||
},
|
||||
{
|
||||
title: "The Best Recipe of Beef Noodle Soup",
|
||||
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'
|
||||
},
|
||||
]
|
@@ -2,6 +2,9 @@ export const LANGUAGE = {
|
||||
BUTTON_LABEL: {
|
||||
BUY_NOW: 'Buy now',
|
||||
SHOP_NOW: 'Shop now',
|
||||
CONFIRM:'Confirm',
|
||||
ADD_TO_CARD: 'Add to Cart',
|
||||
PREORDER: 'Pre-Order Now',
|
||||
},
|
||||
PLACE_HOLDER: {
|
||||
SEARCH: 'Search',
|
||||
|
@@ -1,9 +1,13 @@
|
||||
export interface ProductProps {
|
||||
category: string
|
||||
category?: string
|
||||
name: string
|
||||
slug: string
|
||||
weight: string
|
||||
price: string
|
||||
oldPrice?: string
|
||||
discount?: string
|
||||
imageSrc: string
|
||||
isNotSell?: boolean
|
||||
}
|
||||
|
||||
export interface FeaturedProductProps {
|
||||
@@ -16,7 +20,14 @@ export interface FeaturedProductProps {
|
||||
|
||||
export interface RecipeProps {
|
||||
title: string
|
||||
description:string
|
||||
description: string
|
||||
imageSrc: string
|
||||
}
|
||||
|
||||
export interface BlogProps {
|
||||
title: string
|
||||
slug: string
|
||||
description: string
|
||||
imageSrc: string
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user