mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 04:14:18 +00:00
move to test.tsx
This commit is contained in:
parent
3d0eac6e8f
commit
dea236df09
@ -1,68 +1,26 @@
|
|||||||
|
|
||||||
import { CardBlog, CollapseCommon, Layout, RelevantBlogPosts } 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 {SelectCommon} from 'src/components/common'
|
import {SelectCommon} from 'src/components/common'
|
||||||
import card from "../public/assets/images/card.png"
|
import card from "../public/assets/images/card.png"
|
||||||
|
|
||||||
const CONTENT_DATA = [
|
|
||||||
{
|
|
||||||
title: "This is a subtitle",
|
|
||||||
content: [
|
|
||||||
"When you’re trying to eat healthier but want something more substantial than a leafy green salad, broccoli salad is there for you. I love the crunch and heft of broccoli, especially when it’s cut up into bite size spoonable pieces.",
|
|
||||||
"Some people aren’t into raw broccoli, but I love it! I always go for the raw broccoli on those vegetable platters that seem to be at every potluck/party you go to.",
|
|
||||||
"This is a simple broccoli salad: you have the bulk of it, raw broccoli; crunchy red onions for a bit of acidity and raw crunch, craisins for sweetness, almonds for a nutty counter point; and a sweet and tangy soy-rice vinegar-sesame dressing.",
|
|
||||||
],
|
|
||||||
link: "/title"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "This is a subtitle",
|
|
||||||
content: [
|
|
||||||
"When you’re trying to eat healthier but want something more substantial than a leafy green salad, broccoli salad is there for you. I love the crunch and heft of broccoli, especially when it’s cut up into bite size spoonable pieces.",
|
|
||||||
"Some people aren’t into raw broccoli, but I love it! I always go for the raw broccoli on those vegetable platters that seem to be at every potluck/party you go to.",
|
|
||||||
"This is a simple broccoli salad: you have the bulk of it, raw broccoli; crunchy red onions for a bit of acidity and raw crunch, craisins for sweetness, almonds for a nutty counter point; and a sweet and tangy soy-rice vinegar-sesame dressing.",
|
|
||||||
],
|
|
||||||
link: "/title"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "This is a subtitle",
|
|
||||||
content: [
|
|
||||||
"When you’re trying to eat healthier but want something more substantial than a leafy green salad, broccoli salad is there for you. I love the crunch and heft of broccoli, especially when it’s cut up into bite size spoonable pieces.",
|
|
||||||
"Some people aren’t into raw broccoli, but I love it! I always go for the raw broccoli on those vegetable platters that seem to be at every potluck/party you go to.",
|
|
||||||
"This is a simple broccoli salad: you have the bulk of it, raw broccoli; crunchy red onions for a bit of acidity and raw crunch, craisins for sweetness, almonds for a nutty counter point; and a sweet and tangy soy-rice vinegar-sesame dressing.",
|
|
||||||
],
|
|
||||||
link: "/title"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "This is a subtitle",
|
|
||||||
content: [
|
|
||||||
"When you’re trying to eat healthier but want something more substantial than a leafy green salad, broccoli salad is there for you. I love the crunch and heft of broccoli, especially when it’s cut up into bite size spoonable pieces.",
|
|
||||||
"Some people aren’t into raw broccoli, but I love it! I always go for the raw broccoli on those vegetable platters that seem to be at every potluck/party you go to.",
|
|
||||||
"This is a simple broccoli salad: you have the bulk of it, raw broccoli; crunchy red onions for a bit of acidity and raw crunch, craisins for sweetness, almonds for a nutty counter point; and a sweet and tangy soy-rice vinegar-sesame dressing.",
|
|
||||||
],
|
|
||||||
link: "/title"
|
|
||||||
},
|
|
||||||
]
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* <HomeBanner />
|
<HomeBanner />
|
||||||
<HomeBanner/>
|
<HomeBanner/>
|
||||||
<HomeFeature />
|
<HomeFeature />
|
||||||
<HomeCategories />
|
<HomeCategories />
|
||||||
<HomeCollection />
|
<HomeCollection />
|
||||||
<HomeVideo />
|
<HomeVideo />
|
||||||
<HomeCTA /> */}
|
<HomeCTA />
|
||||||
{/* <HomeRecipe />
|
<HomeRecipe />
|
||||||
<HomeSubscribe /> */}
|
<HomeSubscribe />
|
||||||
{/* <HomeRecipe /> */}
|
|
||||||
{/* <SelectCommon option={OPTION_SORT}>Sort By</SelectCommon>
|
|
||||||
<SelectCommon option={OPTION_SORT} size="large" type="custom">Sort By</SelectCommon> */}
|
|
||||||
<CollapseCommon data={CONTENT_DATA} />
|
|
||||||
<RelevantBlogPosts />
|
|
||||||
{/* todo: uncomment */}
|
{/* todo: uncomment */}
|
||||||
{/* <ModalCreateUserInfo/> */}
|
{/* <ModalCreateUserInfo/> */}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Home.Layout = Layout
|
Home.Layout = Layout
|
||||||
|
@ -4,6 +4,8 @@ import {
|
|||||||
Layout,
|
Layout,
|
||||||
ModalCommon,
|
ModalCommon,
|
||||||
ProductCarousel,
|
ProductCarousel,
|
||||||
|
RelevantBlogPosts,
|
||||||
|
CollapseCommon,
|
||||||
} from 'src/components/common'
|
} from 'src/components/common'
|
||||||
import { CollectionCarcousel } from 'src/components/modules/home'
|
import { CollectionCarcousel } from 'src/components/modules/home'
|
||||||
import image5 from '../public/assets/images/image5.png'
|
import image5 from '../public/assets/images/image5.png'
|
||||||
@ -96,49 +98,49 @@ const dataTest = [
|
|||||||
imageSrc: image6.src,
|
imageSrc: image6.src,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
const COLLAPSE_DATA = [
|
||||||
|
{
|
||||||
|
title: "This is a subtitle",
|
||||||
|
content: [
|
||||||
|
"When you’re trying to eat healthier but want something more substantial than a leafy green salad, broccoli salad is there for you. I love the crunch and heft of broccoli, especially when it’s cut up into bite size spoonable pieces.",
|
||||||
|
"Some people aren’t into raw broccoli, but I love it! I always go for the raw broccoli on those vegetable platters that seem to be at every potluck/party you go to.",
|
||||||
|
"This is a simple broccoli salad: you have the bulk of it, raw broccoli; crunchy red onions for a bit of acidity and raw crunch, craisins for sweetness, almonds for a nutty counter point; and a sweet and tangy soy-rice vinegar-sesame dressing.",
|
||||||
|
],
|
||||||
|
link: "/title"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "This is a subtitle",
|
||||||
|
content: [
|
||||||
|
"When you’re trying to eat healthier but want something more substantial than a leafy green salad, broccoli salad is there for you. I love the crunch and heft of broccoli, especially when it’s cut up into bite size spoonable pieces.",
|
||||||
|
"Some people aren’t into raw broccoli, but I love it! I always go for the raw broccoli on those vegetable platters that seem to be at every potluck/party you go to.",
|
||||||
|
"This is a simple broccoli salad: you have the bulk of it, raw broccoli; crunchy red onions for a bit of acidity and raw crunch, craisins for sweetness, almonds for a nutty counter point; and a sweet and tangy soy-rice vinegar-sesame dressing.",
|
||||||
|
],
|
||||||
|
link: "/title"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "This is a subtitle",
|
||||||
|
content: [
|
||||||
|
"When you’re trying to eat healthier but want something more substantial than a leafy green salad, broccoli salad is there for you. I love the crunch and heft of broccoli, especially when it’s cut up into bite size spoonable pieces.",
|
||||||
|
"Some people aren’t into raw broccoli, but I love it! I always go for the raw broccoli on those vegetable platters that seem to be at every potluck/party you go to.",
|
||||||
|
"This is a simple broccoli salad: you have the bulk of it, raw broccoli; crunchy red onions for a bit of acidity and raw crunch, craisins for sweetness, almonds for a nutty counter point; and a sweet and tangy soy-rice vinegar-sesame dressing.",
|
||||||
|
],
|
||||||
|
link: "/title"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "This is a subtitle",
|
||||||
|
content: [
|
||||||
|
"When you’re trying to eat healthier but want something more substantial than a leafy green salad, broccoli salad is there for you. I love the crunch and heft of broccoli, especially when it’s cut up into bite size spoonable pieces.",
|
||||||
|
"Some people aren’t into raw broccoli, but I love it! I always go for the raw broccoli on those vegetable platters that seem to be at every potluck/party you go to.",
|
||||||
|
"This is a simple broccoli salad: you have the bulk of it, raw broccoli; crunchy red onions for a bit of acidity and raw crunch, craisins for sweetness, almonds for a nutty counter point; and a sweet and tangy soy-rice vinegar-sesame dressing.",
|
||||||
|
],
|
||||||
|
link: "/title"
|
||||||
|
},
|
||||||
|
]
|
||||||
export default function Test() {
|
export default function Test() {
|
||||||
const [visible, setVisible] = useState(false)
|
|
||||||
const onClose = () => {
|
|
||||||
setVisible(false)
|
|
||||||
}
|
|
||||||
const onOpen = () => {
|
|
||||||
setVisible(true)
|
|
||||||
}
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ButtonCommon onClick={onOpen}>open</ButtonCommon>
|
<CollapseCommon data={COLLAPSE_DATA} />
|
||||||
<ModalCommon visible={visible} onClose={onClose}>
|
<RelevantBlogPosts />
|
||||||
<div className="">
|
|
||||||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur
|
|
||||||
officiis dolorum ea incidunt. Sint, cum ullam. Labore vero quod
|
|
||||||
itaque, officia magni molestias! Architecto deserunt soluta laborum
|
|
||||||
commodi nesciunt delectus similique temporibus distinctio? Facere
|
|
||||||
eaque minima enim modi magni, laudantium, animi mollitia beatae
|
|
||||||
repudiandae maxime labore error nesciunt, nisi est?
|
|
||||||
</div>
|
|
||||||
</ModalCommon>
|
|
||||||
<ProductCarousel
|
|
||||||
data={dataTest}
|
|
||||||
itemKey="product-2"
|
|
||||||
isDot
|
|
||||||
option={{
|
|
||||||
slidesPerView: 1,
|
|
||||||
breakpoints: {
|
|
||||||
'(min-width: 640px)': {
|
|
||||||
slidesPerView: 3,
|
|
||||||
},
|
|
||||||
'(min-width: 768px)': {
|
|
||||||
slidesPerView: 4,
|
|
||||||
},
|
|
||||||
'(min-width: 1024px)': {
|
|
||||||
slidesPerView: 4.5,
|
|
||||||
},
|
|
||||||
'(min-width: 1280px)': {
|
|
||||||
slidesPerView: 5.5,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user