mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 12:24:18 +00:00
bug: fix datatest recipes
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { Layout } from 'src/components/common';
|
import { Layout } from 'src/components/common';
|
||||||
import { HomeBanner, HomeCategories, HomeCollection, HomeCTA, HomeFeature, HomeRecipe, HomeSubscribe, HomeVideo } from 'src/components/modules/home';
|
import { HomeBanner, HomeCategories, HomeCollection, HomeCTA, HomeFeature, HomeRecipe, HomeSubscribe, HomeVideo } from 'src/components/modules/home';
|
||||||
|
import HomeSpice from 'src/components/modules/home/HomeSpice/HomeSpice';
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
return (
|
return (
|
||||||
@@ -9,6 +10,7 @@ export default function Home() {
|
|||||||
<HomeCategories />
|
<HomeCategories />
|
||||||
<HomeCollection />
|
<HomeCollection />
|
||||||
<HomeVideo />
|
<HomeVideo />
|
||||||
|
<HomeSpice/>
|
||||||
<HomeCTA />
|
<HomeCTA />
|
||||||
<HomeRecipe />
|
<HomeRecipe />
|
||||||
<HomeSubscribe />
|
<HomeSubscribe />
|
||||||
|
@@ -30,10 +30,13 @@ const HeaderMenu = memo(({ visibleFilter,isFull, openModalAuthen, openModalInfo,
|
|||||||
name: 'Login (Demo)',
|
name: 'Login (Demo)',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// onClick: openModalInfo,
|
onClick: openModalInfo,
|
||||||
link: '/account-not-login',
|
|
||||||
name: 'Create User Info (Demo)',
|
name: 'Create User Info (Demo)',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
link: '/account-not-login',
|
||||||
|
name: 'Account Not Login',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
link: ROUTE.ACCOUNT,
|
link: ROUTE.ACCOUNT,
|
||||||
name: 'Account',
|
name: 'Account',
|
||||||
|
@@ -1,6 +1,9 @@
|
|||||||
@import "../../../styles/utilities";
|
@import "../../../styles/utilities";
|
||||||
.menuNavigationWrapper{
|
.menuNavigationWrapper{
|
||||||
@apply hidden;
|
@apply hidden;
|
||||||
|
@screen md {
|
||||||
|
@apply block;
|
||||||
|
}
|
||||||
.menuNavigationHeading{
|
.menuNavigationHeading{
|
||||||
@screen md {
|
@screen md {
|
||||||
@apply sub-headline font-bold ;
|
@apply sub-headline font-bold ;
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
@import "../../../../styles/utilities";
|
@import "../../../../styles/utilities";
|
||||||
.accountSignInWrapper{
|
.accountSignInWrapper{
|
||||||
|
padding: 5rem;
|
||||||
@apply w-full;
|
@apply w-full;
|
||||||
.imgError{
|
.imgError{
|
||||||
@apply w-full flex justify-center;
|
@apply w-full flex justify-center;
|
||||||
|
@@ -23,6 +23,7 @@ const AccountSignIn = memo(({ } : AccountSignIn) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className={s.accountSignInWrapper}>
|
<div className={s.accountSignInWrapper}>
|
||||||
|
<div>
|
||||||
<div className={s.imgError}>
|
<div className={s.imgError}>
|
||||||
<StaticImage src={AccountSignInImg} />
|
<StaticImage src={AccountSignInImg} />
|
||||||
</div>
|
</div>
|
||||||
@@ -36,6 +37,7 @@ const AccountSignIn = memo(({ } : AccountSignIn) => {
|
|||||||
<div>Don't have an account? </div> <span><a><Link href="/"> Create Account</Link></a></span>
|
<div>Don't have an account? </div> <span><a><Link href="/"> Create Account</Link></a></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
@@ -0,0 +1,3 @@
|
|||||||
|
.homeSpiceWarpper{
|
||||||
|
margin: 5.6rem 0;
|
||||||
|
}
|
19
src/components/modules/home/HomeSpice/HomeSpice.tsx
Normal file
19
src/components/modules/home/HomeSpice/HomeSpice.tsx
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import React from 'react'
|
||||||
|
import { ProductCarousel } from 'src/components/common'
|
||||||
|
import { SPICE_DATA_TEST } from "../../../../utils/demo-data"
|
||||||
|
import s from './HomeSpice.module.scss'
|
||||||
|
|
||||||
|
interface HomeSpice {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const HomeSpice = ({}: HomeSpice) => {
|
||||||
|
return (
|
||||||
|
<div className={s.homeSpiceWarpper}>
|
||||||
|
<ProductCarousel data={SPICE_DATA_TEST} itemKey="product-7"/>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default HomeSpice
|
@@ -2,9 +2,9 @@ import Image from 'next/image'
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import s from './HomeVideo.module.scss'
|
import s from './HomeVideo.module.scss'
|
||||||
import LogoBrand from './assets/logo_maggi.png'
|
import LogoBrand from './assets/logo_maggi.png'
|
||||||
import { ProductCarousel, VideoPlayer } from 'src/components/common'
|
import { VideoPlayer } from 'src/components/common'
|
||||||
import HeadingCommon from '../../../common/HeadingCommon/HeadingCommon'
|
import HeadingCommon from '../../../common/HeadingCommon/HeadingCommon'
|
||||||
import {PRODUCT_DATA_TEST} from "../../../../utils/demo-data";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
className?: string
|
className?: string
|
||||||
@@ -27,7 +27,6 @@ const HomeVideo = ({ }: Props) => {
|
|||||||
{/* todo: change url video */}
|
{/* todo: change url video */}
|
||||||
<VideoPlayer url='https://www.youtube.com/watch?v=nXH23nYYM3s' controls={true} />
|
<VideoPlayer url='https://www.youtube.com/watch?v=nXH23nYYM3s' controls={true} />
|
||||||
</div>
|
</div>
|
||||||
<ProductCarousel data={PRODUCT_DATA_TEST} itemKey="product-7"/>
|
|
||||||
</section >
|
</section >
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@@ -6,7 +6,8 @@ import PaginationCommon from 'src/components/common/PaginationCommon/PaginationC
|
|||||||
import { RecipeCardProps } from 'src/components/common/RecipeCard/RecipeCard';
|
import { RecipeCardProps } from 'src/components/common/RecipeCard/RecipeCard';
|
||||||
import { OPTION_ALL, QUERY_KEY, ROUTE } from 'src/utils/constanst.utils';
|
import { OPTION_ALL, QUERY_KEY, ROUTE } from 'src/utils/constanst.utils';
|
||||||
import HeadingCommon from "../../../common/HeadingCommon/HeadingCommon";
|
import HeadingCommon from "../../../common/HeadingCommon/HeadingCommon";
|
||||||
import RecipesItem from './RecipesItem/RecipesItem';
|
import { RecipeCard } from 'src/components/common'
|
||||||
|
|
||||||
import s from './RecipesList.module.scss';
|
import s from './RecipesList.module.scss';
|
||||||
|
|
||||||
const recipe:RecipeCardProps[] = [
|
const recipe:RecipeCardProps[] = [
|
||||||
@@ -46,6 +47,7 @@ const recipe:RecipeCardProps[] = [
|
|||||||
imageSrc: 'https://user-images.githubusercontent.com/76729908/132159262-f28a9fb9-4852-47e6-80b5-d600521b548a.png',
|
imageSrc: 'https://user-images.githubusercontent.com/76729908/132159262-f28a9fb9-4852-47e6-80b5-d600521b548a.png',
|
||||||
slug:"the-best-recipe-of-beef-noodle-soup"
|
slug:"the-best-recipe-of-beef-noodle-soup"
|
||||||
},];
|
},];
|
||||||
|
|
||||||
const DEFAULT_PAGESIZE_RECIPELIST = 6;
|
const DEFAULT_PAGESIZE_RECIPELIST = 6;
|
||||||
|
|
||||||
const BREADCRUMB = [
|
const BREADCRUMB = [
|
||||||
@@ -159,11 +161,10 @@ const OPTIONSLECT=[
|
|||||||
interface Props{
|
interface Props{
|
||||||
data?: RecipeCardProps[],
|
data?: RecipeCardProps[],
|
||||||
recipes?:{
|
recipes?:{
|
||||||
id:string,
|
|
||||||
title:string,
|
title:string,
|
||||||
image:string,
|
imageSrc:string,
|
||||||
description:string,
|
description:string,
|
||||||
link:string
|
slug:string
|
||||||
}[],
|
}[],
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,12 +204,7 @@ const RecipesList = ({ data =recipe}:Props) => {
|
|||||||
<div className={s.boxItem}>
|
<div className={s.boxItem}>
|
||||||
{data?.map((item,index) => (
|
{data?.map((item,index) => (
|
||||||
<div key={index} className={s.item}>
|
<div key={index} className={s.item}>
|
||||||
<RecipesItem
|
<RecipeCard slug={item.slug} imageSrc={item.imageSrc} title={item.title} description={item.description}/>
|
||||||
name={item.title}
|
|
||||||
image={item.imageSrc}
|
|
||||||
description={item.description}
|
|
||||||
link="#"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
@@ -68,7 +68,72 @@ export const PRODUCT_DATA_TEST = [
|
|||||||
imageSrc: "https://user-images.githubusercontent.com/76729908/131646231-2d1c3ad1-4f5b-4a8e-9874-ca731f4ce128.png",
|
imageSrc: "https://user-images.githubusercontent.com/76729908/131646231-2d1c3ad1-4f5b-4a8e-9874-ca731f4ce128.png",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
export const SPICE_DATA_TEST = [
|
||||||
|
{
|
||||||
|
name: 'Tomato',
|
||||||
|
slug: 'tomato',
|
||||||
|
weight: '250g',
|
||||||
|
category: 'VEGGIE',
|
||||||
|
price: 'Rp 27.500',
|
||||||
|
imageSrc: "https://user-images.githubusercontent.com/89437339/133218370-4145e774-4d99-45f9-9200-9dc1f55b967d.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Cucumber',
|
||||||
|
slug: 'tomato',
|
||||||
|
weight: '250g',
|
||||||
|
category: 'VEGGIE',
|
||||||
|
price: 'Rp 27.500',
|
||||||
|
imageSrc: "https://user-images.githubusercontent.com/89437339/133218428-20bd1a2b-b3e2-477a-8cef-2b9f0a5c8899.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Carrot',
|
||||||
|
slug: 'tomato',
|
||||||
|
weight: '250g',
|
||||||
|
category: 'VEGGIE',
|
||||||
|
price: 'Rp 27.500',
|
||||||
|
imageSrc: "https://user-images.githubusercontent.com/89437339/133218473-99e96817-40b6-45a4-9fed-daa269ae912f.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Salad',
|
||||||
|
slug: 'tomato',
|
||||||
|
weight: '250g',
|
||||||
|
category: 'VEGGIE',
|
||||||
|
price: 'Rp 27.500',
|
||||||
|
imageSrc: "https://user-images.githubusercontent.com/89437339/133218528-9da429bf-11ab-43a2-9700-ed7c7114cd12.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Tomato',
|
||||||
|
slug: 'tomato',
|
||||||
|
weight: '250g',
|
||||||
|
category: 'VEGGIE',
|
||||||
|
price: 'Rp 27.500',
|
||||||
|
imageSrc: "https://user-images.githubusercontent.com/89437339/133218535-60015545-fe6d-4af0-9650-3c18f14b4b20.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Cucumber',
|
||||||
|
slug: 'tomato',
|
||||||
|
weight: '250g',
|
||||||
|
category: 'VEGGIE',
|
||||||
|
price: 'Rp 27.500',
|
||||||
|
imageSrc: "https://user-images.githubusercontent.com/89437339/133218538-10d41f11-a484-4f42-ae1f-dc95ac9e5773.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Tomato',
|
||||||
|
slug: 'tomato',
|
||||||
|
weight: '250g',
|
||||||
|
category: 'VEGGIE',
|
||||||
|
price: 'Rp 27.500',
|
||||||
|
imageSrc: "https://user-images.githubusercontent.com/89437339/133218370-4145e774-4d99-45f9-9200-9dc1f55b967d.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Cucumber',
|
||||||
|
slug: 'tomato',
|
||||||
|
weight: '250g',
|
||||||
|
category: 'VEGGIE',
|
||||||
|
price: 'Rp 27.500',
|
||||||
|
imageSrc: "https://user-images.githubusercontent.com/89437339/133218428-20bd1a2b-b3e2-477a-8cef-2b9f0a5c8899.png",
|
||||||
|
},
|
||||||
|
]
|
||||||
export const PRODUCT_CART_DATA_TEST = [
|
export const PRODUCT_CART_DATA_TEST = [
|
||||||
{
|
{
|
||||||
name: 'Tomato',
|
name: 'Tomato',
|
||||||
|
Reference in New Issue
Block a user