mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 12:24:18 +00:00
✨ feat: product lisT
:%s
This commit is contained in:
17
pages/products.tsx
Normal file
17
pages/products.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Layout } from 'src/components/common';
|
||||
import ProductListFilter from 'src/components/modules/product-list/ProductListFilter/ProductListFilter';
|
||||
import RecipeListBanner from 'src/components/modules/recipes-list/RecipeListBanner/RecipeListBanner';
|
||||
import RecipesList from 'src/components/modules/recipes-list/RecipesList/RecipesList';
|
||||
import ProductListBanner from '../src/components/modules/product-list/ProductListBanner/ProductListBanner';
|
||||
|
||||
|
||||
export default function Products() {
|
||||
return (
|
||||
<>
|
||||
<ProductListBanner />
|
||||
<ProductListFilter/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Products.Layout = Layout
|
@@ -1,81 +1,33 @@
|
||||
import {
|
||||
Layout, RecipeDetail
|
||||
} from 'src/components/common';
|
||||
import MenuNavigation from 'src/components/common/MenuNavigation/MenuNavigation';
|
||||
import MenuNavigationProductList from 'src/components/common/MenuNavigationProductList/MenuNavigationProductList';
|
||||
// import { RecipeListPage } from 'src/components/modules/recipes';
|
||||
import { OPTION_ALL, QUERY_KEY, ROUTE } from 'src/utils/constanst.utils';
|
||||
import { ImgWithLink, Layout, StaticImage } from 'src/components/common'
|
||||
import TestImg from '../public/assets/images/image5.png'
|
||||
|
||||
const CATEGORY = [
|
||||
{
|
||||
name: 'All',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.BRAND}=${OPTION_ALL}`,
|
||||
},
|
||||
{
|
||||
name: 'Veggie',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.BRAND}=veggie`,
|
||||
},
|
||||
{
|
||||
name: 'Seafood',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.BRAND}=seafood`,
|
||||
},
|
||||
{
|
||||
name: 'Frozen',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.BRAND}=frozen`,
|
||||
},
|
||||
{
|
||||
name: 'Coffee Bean',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.BRAND}=coffee-bean`,
|
||||
},
|
||||
{
|
||||
name: 'Sauce',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.BRAND}=sauce`,
|
||||
},
|
||||
]
|
||||
const BRAND = [
|
||||
|
||||
{
|
||||
name: 'Maggi',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.BRAND}=veggie`,
|
||||
},
|
||||
{
|
||||
name: 'Cholimes',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.BRAND}=seafood`,
|
||||
},
|
||||
{
|
||||
name: 'Chinsu',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.BRAND}=frozen`,
|
||||
}
|
||||
];
|
||||
|
||||
const FEATURED = [
|
||||
|
||||
{
|
||||
name: 'Best Sellers',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.BRAND}=veggie`,
|
||||
},
|
||||
{
|
||||
name: 'Sales',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.BRAND}=seafood`,
|
||||
},
|
||||
{
|
||||
name: 'New Item',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.BRAND}=frozen`,
|
||||
},
|
||||
{
|
||||
name: 'Viewed',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.BRAND}=viewed`,
|
||||
}
|
||||
];
|
||||
export default function Test() {
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* <BlogDetailPage /> */}
|
||||
<ImgWithLink src="https://user-images.githubusercontent.com/76729908/131634880-8ae1437b-d3f8-421e-a546-d5a4f9a28e5f.png" alt="test" />
|
||||
<StaticImage src={TestImg} />
|
||||
<button className="shape-common" style={{padding: '2rem', background: 'pink'}}>
|
||||
Lorem ipsum dolor
|
||||
</button>
|
||||
|
||||
<button className="shape-common-border" style={{padding: '2rem'}}>
|
||||
<div className="inner">
|
||||
Lorem ipsum dolor sit
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<div className="shape-common-lg" style={{ background: "blue" }}>
|
||||
<div className="inner">
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Nam vel optio fuga nobis nostrum! Magnam tenetur, et doloremque unde enim dolorem aspernatur nobis vitae impedit iste iure distinctio labore, quidem illo itaque necessitatibus eligendi magni architecto illum cumque corrupti esse a. Eius tenetur voluptas autem corrupti, amet porro beatae ratione maiores! Dolorum earum placeat totam corporis sint quae quam at vero eos magni amet, nisi eum qui natus exercitationem ea eveniet esse aut in. Ipsa hic saepe veritatis quas dignissimos corrupti sapiente quis, mollitia ducimus, ipsum ratione quos doloribus quidem, dolor neque! Eligendi quibusdam aspernatur, maxime vitae incidunt ipsam itaque ab distinctio? Architecto ratione deserunt saepe sequi alias accusantium harum quae itaque aut odit voluptates, hic beatae similique expedita! Modi, sunt exercitationem! Mollitia, eius! Molestiae nostrum, quas, ratione deleniti, adipisci pariatur omnis veniam blanditiis iste quia laboriosam est labore doloribus officiis repellendus consequatur. Ducimus impedit voluptate doloribus repellendus exercitationem mollitia labore ab totam reiciendis distinctio. Nesciunt dolor officiis reiciendis esse nostrum modi inventore, cum, veritatis placeat doloribus iure perspiciatis tempora a mollitia soluta fugit! Aspernatur necessitatibus provident, reiciendis sapiente temporibus labore. Optio tempora ipsam blanditiis fugiat sint reiciendis, deleniti itaque fuga omnis aut architecto animi, aliquam quis aliquid ipsum necessitatibus dolorem sequi aperiam magni non! Atque deserunt autem nihil, in voluptatem, natus quibusdam fugiat velit aspernatur ullam quam quo consequuntur eius. Pariatur dolor obcaecati quam reprehenderit, est corporis ea beatae quia numquam nemo in eum voluptatem ullam sequi atque? Quos neque voluptatem maxime, repellat cupiditate accusantium, maiores in aperiam, eveniet asperiores eligendi velit iusto voluptates dolores. Nostrum officia commodi dolore asperiores sequi, molestiae quasi. Deserunt, molestiae voluptate. Perferendis earum consectetur adipisci ratione nisi nihil minus. Ipsum voluptas dolorum voluptates dolores reprehenderit nemo, exercitationem labore, quas voluptatibus officiis fuga ullam ab, eius quae. Quibusdam perferendis iusto nobis, cupiditate officiis sapiente molestiae distinctio magnam dolore voluptatum quos ratione fugiat autem corporis rerum esse possimus perspiciatis ex officia eos numquam blanditiis assumenda natus. At nihil excepturi et consectetur nobis dicta tempora dolorum neque, saepe minima mollitia, officiis ex atque reprehenderit blanditiis animi dolore ratione quam. Id animi facere repudiandae eos facilis? Dolorum quae illo nam tempora, quasi ut placeat beatae minus consequatur libero maiores repudiandae, voluptates sed natus animi a. Cum numquam atque explicabo temporibus consequatur odit voluptates tenetur pariatur optio nihil eligendi ab veniam nisi velit quaerat natus, ea facere eveniet corrupti! Iste temporibus placeat tenetur incidunt obcaecati quam nulla nemo cum accusantium quo velit, maiores, esse illum ipsam dolore enim sunt, aspernatur illo provident delectus officia sit officiis qui! Ullam quam numquam mollitia reprehenderit? Facere, quos amet praesentium officia nostrum veritatis, autem laborum quidem architecto eveniet voluptatum, nisi voluptate totam saepe. Obcaecati non vitae accusantium voluptates iure voluptatem nulla, quaerat culpa officia quasi mollitia doloremque. Deserunt officia aliquid totam quibusdam, doloribus quos porro sit alias, perspiciatis facilis exercitationem inventore adipisci aliquam saepe ipsam dignissimos. Minima iste dolorem esse optio necessitatibus voluptas deserunt sint quam, veniam nulla vitae eaque omnis alias! Natus ut, doloribus quia laboriosam id voluptates? Quibusdam aliquid ea nemo.
|
||||
</div>
|
||||
</div>
|
||||
<div className="shape-common-lg-border" >
|
||||
<div className="inner" style={{ background: "blue" }}>
|
||||
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Voluptate, maiores cum quam odit quia est magni aut reiciendis deleniti, ea quae, dolorem vero fuga veritatis culpa? Eum sunt quia et consequatur tenetur, atque eius illo quibusdam laudantium iusto quo cumque, ad dolor dicta eos inventore ipsa fugit voluptates similique incidunt doloribus? Dicta, ipsa? Suscipit porro dicta dolorum rem. Placeat provident quisquam excepturi obcaecati tempora, eaque incidunt accusantium suscipit velit ex quo, voluptatem eum inventore illum exercitationem beatae sint temporibus aliquid, unde expedita recusandae. Repudiandae, nesciunt natus adipisci, error consectetur, fugit magni ducimus est delectus voluptates cupiditate explicabo dolorem maxime hic. Natus, quidem beatae rem aliquam nobis illo reprehenderit, distinctio qui adipisci quaerat sapiente hic nisi ad. Voluptatem dolore eius eos doloribus quam repudiandae cum, culpa expedita error fugiat. Labore eius voluptatum reiciendis repellendus. Enim sapiente dolore tenetur totam esse laboriosam labore aperiam aspernatur! Magnam voluptas iure recusandae delectus, in impedit nobis aliquam debitis laudantium, explicabo quas molestiae quos rem quibusdam nemo placeat nam, dolore doloribus quaerat eum! Quam nesciunt architecto debitis consequuntur sint culpa exercitationem dicta numquam dolorum eius illum similique fuga magni veritatis sequi, et excepturi distinctio laborum quidem. Tempore debitis natus iure, enim molestiae provident? Sed dignissimos velit dolores quia recusandae quam? Beatae, officia dolor. Repellendus dicta provident veniam itaque beatae, eius labore sapiente aspernatur exercitationem ducimus quam est quas quaerat officia consequatur temporibus tempore! Iusto, voluptatum maxime provident, voluptatem ullam recusandae facere error, animi sequi quidem modi illo accusamus non consequuntur deserunt fuga sit labore cum dolorem delectus unde architecto! Mollitia consequuntur veniam sit nihil itaque praesentium temporibus inventore nemo odio necessitatibus eum corporis at et consequatur alias deserunt eligendi aliquid voluptatem quasi exercitationem, voluptatum quos aut voluptate ipsum? Error provident repellat fuga temporibus delectus rem, exercitationem doloremque voluptatem dignissimos, quod amet neque sed quidem nostrum deserunt est debitis obcaecati. Aspernatur veniam vel soluta labore expedita cum quo debitis ab exercitationem, saepe aliquam officia praesentium optio voluptatem atque. Voluptatem ullam et voluptas eligendi omnis fugiat? Ipsam laudantium beatae perspiciatis quis! Nemo optio, quia esse perspiciatis iste et veniam illum qui praesentium, expedita assumenda? Quae distinctio repellendus excepturi ut eos enim optio earum, laborum aperiam, sed sit alias incidunt voluptatibus? Officia, quos. Labore porro repellendus, suscipit praesentium possimus adipisci, quidem illum consequuntur ut id quae quas cum corrupti laboriosam nesciunt nisi dolorum ullam dolor nobis debitis, ipsam inventore? Doloribus dignissimos ipsa aliquid? Dolores nemo ab hic ipsum expedita maxime corporis recusandae inventore, aliquam voluptate voluptatibus dolor dignissimos suscipit explicabo, officia consequuntur officiis ipsam cumque debitis odio qui? Earum minus quaerat possimus ea laudantium laboriosam enim omnis molestias quod nesciunt vel vero officia, ad inventore voluptatem dicta dolorem rem voluptates ab quasi nisi, esse quis. Fuga ad animi reiciendis nulla officiis possimus adipisci ducimus eum, molestias neque enim doloremque nam recusandae labore commodi, quia sed illo fugit molestiae qui hic voluptate facere dignissimos. Dolor porro ab modi nam vitae architecto delectus quo et velit pariatur omnis quae in ullam ex quis rerum, corporis alias, nobis veritatis aperiam commodi hic!
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{/* <RecipeListPage/> */}
|
||||
{/*<MenuNavigation heading="CATEGORIES" categories={CATEGORY}/>*/}
|
||||
<MenuNavigationProductList categories={CATEGORY} brands={BRAND} featured={FEATURED}/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
634
report.20210909.162411.14356.0.001.json
Normal file
634
report.20210909.162411.14356.0.001.json
Normal file
@@ -0,0 +1,634 @@
|
||||
|
||||
{
|
||||
"header": {
|
||||
"reportVersion": 1,
|
||||
"event": "Allocation failed - JavaScript heap out of memory",
|
||||
"trigger": "FatalError",
|
||||
"filename": "report.20210909.162411.14356.0.001.json",
|
||||
"dumpEventTime": "2021-09-09T16:24:11Z",
|
||||
"dumpEventTimeStamp": "1631179451642",
|
||||
"processId": 14356,
|
||||
"cwd": "G:\\hoc-fpt-2\\làm việc\\kie\\work\\grocery-vercel-commerce",
|
||||
"commandLine": [
|
||||
"node",
|
||||
"G:\\hoc-fpt-2\\làm việc\\kie\\work\\grocery-vercel-commerce\\node_modules\\.bin\\\\..\\next\\dist\\bin\\next",
|
||||
"dev"
|
||||
],
|
||||
"nodejsVersion": "v12.15.0",
|
||||
"wordSize": 64,
|
||||
"arch": "x64",
|
||||
"platform": "win32",
|
||||
"componentVersions": {
|
||||
"node": "12.15.0",
|
||||
"v8": "7.7.299.13-node.16",
|
||||
"uv": "1.33.1",
|
||||
"zlib": "1.2.11",
|
||||
"brotli": "1.0.7",
|
||||
"ares": "1.15.0",
|
||||
"modules": "72",
|
||||
"nghttp2": "1.40.0",
|
||||
"napi": "5",
|
||||
"llhttp": "2.0.4",
|
||||
"http_parser": "2.9.3",
|
||||
"openssl": "1.1.1d",
|
||||
"cldr": "35.1",
|
||||
"icu": "64.2",
|
||||
"tz": "2019c",
|
||||
"unicode": "12.1"
|
||||
},
|
||||
"release": {
|
||||
"name": "node",
|
||||
"lts": "Erbium",
|
||||
"headersUrl": "https://nodejs.org/download/release/v12.15.0/node-v12.15.0-headers.tar.gz",
|
||||
"sourceUrl": "https://nodejs.org/download/release/v12.15.0/node-v12.15.0.tar.gz",
|
||||
"libUrl": "https://nodejs.org/download/release/v12.15.0/win-x64/node.lib"
|
||||
},
|
||||
"osName": "Windows_NT",
|
||||
"osRelease": "10.0.19043",
|
||||
"osVersion": "Windows 10 Pro",
|
||||
"osMachine": "x86_64",
|
||||
"cpus": [
|
||||
{
|
||||
"model": "Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz",
|
||||
"speed": 2395,
|
||||
"user": 77383734,
|
||||
"nice": 0,
|
||||
"sys": 38262234,
|
||||
"idle": 289301562,
|
||||
"irq": 4023859
|
||||
},
|
||||
{
|
||||
"model": "Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz",
|
||||
"speed": 2395,
|
||||
"user": 78754296,
|
||||
"nice": 0,
|
||||
"sys": 28849546,
|
||||
"idle": 297343500,
|
||||
"irq": 670015
|
||||
},
|
||||
{
|
||||
"model": "Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz",
|
||||
"speed": 2395,
|
||||
"user": 87811078,
|
||||
"nice": 0,
|
||||
"sys": 29829109,
|
||||
"idle": 287307140,
|
||||
"irq": 361687
|
||||
},
|
||||
{
|
||||
"model": "Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz",
|
||||
"speed": 2395,
|
||||
"user": 88812562,
|
||||
"nice": 0,
|
||||
"sys": 27906453,
|
||||
"idle": 288228328,
|
||||
"irq": 299734
|
||||
}
|
||||
],
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"name": "Wi-Fi",
|
||||
"internal": false,
|
||||
"mac": "a4:17:31:1d:cc:e5",
|
||||
"address": "2402:800:6318:9d24:f937:34a5:8214:a074",
|
||||
"netmask": "ffff:ffff:ffff:ffff::",
|
||||
"family": "IPv6",
|
||||
"scopeid": 0
|
||||
},
|
||||
{
|
||||
"name": "Wi-Fi",
|
||||
"internal": false,
|
||||
"mac": "a4:17:31:1d:cc:e5",
|
||||
"address": "2402:800:6318:9d24:e935:47df:3dd7:735f",
|
||||
"netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
|
||||
"family": "IPv6",
|
||||
"scopeid": 0
|
||||
},
|
||||
{
|
||||
"name": "Wi-Fi",
|
||||
"internal": false,
|
||||
"mac": "a4:17:31:1d:cc:e5",
|
||||
"address": "fe80::f937:34a5:8214:a074",
|
||||
"netmask": "ffff:ffff:ffff:ffff::",
|
||||
"family": "IPv6",
|
||||
"scopeid": 21
|
||||
},
|
||||
{
|
||||
"name": "Wi-Fi",
|
||||
"internal": false,
|
||||
"mac": "a4:17:31:1d:cc:e5",
|
||||
"address": "192.168.1.11",
|
||||
"netmask": "255.255.255.0",
|
||||
"family": "IPv4"
|
||||
},
|
||||
{
|
||||
"name": "Loopback Pseudo-Interface 1",
|
||||
"internal": true,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"address": "::1",
|
||||
"netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
|
||||
"family": "IPv6",
|
||||
"scopeid": 0
|
||||
},
|
||||
{
|
||||
"name": "Loopback Pseudo-Interface 1",
|
||||
"internal": true,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"address": "127.0.0.1",
|
||||
"netmask": "255.0.0.0",
|
||||
"family": "IPv4"
|
||||
}
|
||||
],
|
||||
"host": "DESKTOP-TILU55O"
|
||||
},
|
||||
"javascriptStack": {
|
||||
"message": "No stack.",
|
||||
"stack": [
|
||||
"Unavailable."
|
||||
]
|
||||
},
|
||||
"nativeStack": [
|
||||
{
|
||||
"pc": "0x00007ff7cdbe1759",
|
||||
"symbol": "std::basic_ostream<char,std::char_traits<char> >::operator<<+10873"
|
||||
},
|
||||
{
|
||||
"pc": "0x00007ff7cdbe5b7c",
|
||||
"symbol": "std::basic_ostream<char,std::char_traits<char> >::operator<<+28316"
|
||||
},
|
||||
{
|
||||
"pc": "0x00007ff7cdbe4b38",
|
||||
"symbol": "std::basic_ostream<char,std::char_traits<char> >::operator<<+24152"
|
||||
},
|
||||
{
|
||||
"pc": "0x00007ff7cdcd446b",
|
||||
"symbol": "v8::base::CPU::has_sse+37723"
|
||||
},
|
||||
{
|
||||
"pc": "0x00007ff7ce4d8d9e",
|
||||
"symbol": "v8::Isolate::ReportExternalAllocationLimitReached+94"
|
||||
},
|
||||
{
|
||||
"pc": "0x00007ff7ce4c0de1",
|
||||
"symbol": "v8::SharedArrayBuffer::Externalize+833"
|
||||
},
|
||||
{
|
||||
"pc": "0x00007ff7ce38e6ac",
|
||||
"symbol": "v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1436"
|
||||
},
|
||||
{
|
||||
"pc": "0x00007ff7ce399a50",
|
||||
"symbol": "v8::internal::Heap::ProtectUnprotectedMemoryChunks+1312"
|
||||
},
|
||||
{
|
||||
"pc": "0x00007ff7ce396584",
|
||||
"symbol": "v8::internal::Heap::PageFlagsAreConsistent+3204"
|
||||
},
|
||||
{
|
||||
"pc": "0x00007ff7ce38be13",
|
||||
"symbol": "v8::internal::Heap::CollectGarbage+1283"
|
||||
},
|
||||
{
|
||||
"pc": "0x00007ff7ce38a5e4",
|
||||
"symbol": "v8::internal::Heap::AddRetainedMap+2356"
|
||||
},
|
||||
{
|
||||
"pc": "0x00007ff7ce3ab8b5",
|
||||
"symbol": "v8::internal::Factory::NewFillerObject+53"
|
||||
},
|
||||
{
|
||||
"pc": "0x00007ff7ce117b89",
|
||||
"symbol": "v8::internal::interpreter::JumpTableTargetOffsets::iterator::operator=+4057"
|
||||
},
|
||||
{
|
||||
"pc": "0x00007ff7ce904d3d",
|
||||
"symbol": "v8::internal::SetupIsolateDelegate::SetupHeap+567949"
|
||||
},
|
||||
{
|
||||
"pc": "0x000003ec3249fceb",
|
||||
"symbol": ""
|
||||
}
|
||||
],
|
||||
"javascriptHeap": {
|
||||
"totalMemory": 2151399424,
|
||||
"totalCommittedMemory": 2151399424,
|
||||
"usedMemory": 2073679128,
|
||||
"availableMemory": 51804896,
|
||||
"memoryLimit": 2197815296,
|
||||
"heapSpaces": {
|
||||
"read_only_space": {
|
||||
"memorySize": 262144,
|
||||
"committedMemory": 262144,
|
||||
"capacity": 261872,
|
||||
"used": 32296,
|
||||
"available": 229576
|
||||
},
|
||||
"new_space": {
|
||||
"memorySize": 2097152,
|
||||
"committedMemory": 2097152,
|
||||
"capacity": 1047488,
|
||||
"used": 97208,
|
||||
"available": 950280
|
||||
},
|
||||
"old_space": {
|
||||
"memorySize": 1644802048,
|
||||
"committedMemory": 1644802048,
|
||||
"capacity": 1577839984,
|
||||
"used": 1574678304,
|
||||
"available": 3161680
|
||||
},
|
||||
"code_space": {
|
||||
"memorySize": 5144576,
|
||||
"committedMemory": 5144576,
|
||||
"capacity": 4272640,
|
||||
"used": 4272640,
|
||||
"available": 0
|
||||
},
|
||||
"map_space": {
|
||||
"memorySize": 8130560,
|
||||
"committedMemory": 8130560,
|
||||
"capacity": 4150160,
|
||||
"used": 4150160,
|
||||
"available": 0
|
||||
},
|
||||
"large_object_space": {
|
||||
"memorySize": 489766912,
|
||||
"committedMemory": 489766912,
|
||||
"capacity": 489351272,
|
||||
"used": 489351272,
|
||||
"available": 0
|
||||
},
|
||||
"code_large_object_space": {
|
||||
"memorySize": 1196032,
|
||||
"committedMemory": 1196032,
|
||||
"capacity": 1097248,
|
||||
"used": 1097248,
|
||||
"available": 0
|
||||
},
|
||||
"new_large_object_space": {
|
||||
"memorySize": 0,
|
||||
"committedMemory": 0,
|
||||
"capacity": 1047488,
|
||||
"used": 0,
|
||||
"available": 1047488
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourceUsage": {
|
||||
"userCpuSeconds": 3948.5,
|
||||
"kernelCpuSeconds": 161.609,
|
||||
"cpuConsumptionPercent": 15.0548,
|
||||
"maxRss": 3016343552,
|
||||
"pageFaults": {
|
||||
"IORequired": 18788222,
|
||||
"IONotRequired": 0
|
||||
},
|
||||
"fsActivity": {
|
||||
"reads": 42626,
|
||||
"writes": 632648
|
||||
}
|
||||
},
|
||||
"libuv": [
|
||||
],
|
||||
"environmentVariables": {
|
||||
"=G:": "G:\\hoc-fpt-2\\làm việc\\kie\\work\\grocery-vercel-commerce",
|
||||
"ALLUSERSPROFILE": "C:\\ProgramData",
|
||||
"ANDROID_HOME": "G:\\ASDK",
|
||||
"ANDROID_SDK_ROOT": "G:\\ASDK",
|
||||
"APPDATA": "C:\\Users\\nhan\\AppData\\Roaming",
|
||||
"ChocolateyInstall": "C:\\ProgramData\\chocolatey",
|
||||
"ChocolateyLastPathUpdate": "132608575831335062",
|
||||
"CHROME_CRASHPAD_PIPE_NAME": "\\\\.\\pipe\\crashpad_16216_SBAEYTWYVPQDZSNO",
|
||||
"CLASSPATH": "C:\\Program Files\\Java\\jdk1.8.0_231\\bin",
|
||||
"COLORTERM": "truecolor",
|
||||
"COMMERCE_CUSTOMERAUTH_ENABLED": "true",
|
||||
"COMMERCE_PROVIDER": "vendure",
|
||||
"CommonProgramFiles": "C:\\Program Files\\Common Files",
|
||||
"CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files",
|
||||
"CommonProgramW6432": "C:\\Program Files\\Common Files",
|
||||
"COMPUTERNAME": "DESKTOP-TILU55O",
|
||||
"ComSpec": "C:\\WINDOWS\\system32\\cmd.exe",
|
||||
"dp0": "G:\\hoc-fpt-2\\làm việc\\kie\\work\\grocery-vercel-commerce\\node_modules\\.bin\\",
|
||||
"DriverData": "C:\\Windows\\System32\\Drivers\\DriverData",
|
||||
"FPS_BROWSER_APP_PROFILE_STRING": "Internet Explorer",
|
||||
"FPS_BROWSER_USER_PROFILE_STRING": "Default",
|
||||
"GIT_ASKPASS": "c:\\Users\\nhan\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\extensions\\git\\dist\\askpass.sh",
|
||||
"GIT_LFS_PATH": "C:\\Program Files\\Git LFS",
|
||||
"HOME": "C:\\Users\\nhan",
|
||||
"HOMEDRIVE": "C:",
|
||||
"HOMEPATH": "\\Users\\nhan",
|
||||
"INIT_CWD": "G:\\hoc-fpt-2\\làm việc\\kie\\work\\grocery-vercel-commerce",
|
||||
"JAVA_HOME": "C:\\Program Files\\Java\\jdk1.8.0_281",
|
||||
"LANG": "en_US.UTF-8",
|
||||
"LOCALAPPDATA": "C:\\Users\\nhan\\AppData\\Local",
|
||||
"LOGONSERVER": "\\\\DESKTOP-TILU55O",
|
||||
"NEXT_PUBLIC_VENDURE_LOCAL_URL": "/vendure-shop-api",
|
||||
"NEXT_PUBLIC_VENDURE_SHOP_API_URL": "https://demo.vendure.io/shop-api",
|
||||
"NODE": "C:\\Program Files\\nodejs\\node.exe",
|
||||
"NODE_ENV": "development",
|
||||
"NODE_EXE": "C:\\Program Files\\nodejs\\\\node.exe",
|
||||
"NODE_OPTIONS": "'--inspect' ",
|
||||
"NPM_CLI_JS": "C:\\Program Files\\nodejs\\\\node_modules\\npm\\bin\\npm-cli.js",
|
||||
"npm_config_access": "",
|
||||
"npm_config_allow_same_version": "",
|
||||
"npm_config_also": "",
|
||||
"npm_config_always_auth": "",
|
||||
"npm_config_argv": "{\"remain\":[],\"cooked\":[\"run\",\"dev-windows\"],\"original\":[\"run\",\"dev-windows\"]}",
|
||||
"npm_config_audit": "true",
|
||||
"npm_config_audit_level": "low",
|
||||
"npm_config_auth_type": "legacy",
|
||||
"npm_config_before": "",
|
||||
"npm_config_bin_links": "true",
|
||||
"npm_config_browser": "",
|
||||
"npm_config_ca": "",
|
||||
"npm_config_cache": "C:\\Users\\nhan\\AppData\\Roaming\\npm-cache",
|
||||
"npm_config_cache_lock_retries": "10",
|
||||
"npm_config_cache_lock_stale": "60000",
|
||||
"npm_config_cache_lock_wait": "10000",
|
||||
"npm_config_cache_max": "Infinity",
|
||||
"npm_config_cache_min": "10",
|
||||
"npm_config_cafile": "",
|
||||
"npm_config_cert": "",
|
||||
"npm_config_cidr": "",
|
||||
"npm_config_color": "true",
|
||||
"npm_config_commit_hooks": "true",
|
||||
"npm_config_depth": "Infinity",
|
||||
"npm_config_description": "true",
|
||||
"npm_config_dev": "",
|
||||
"npm_config_dry_run": "",
|
||||
"npm_config_editor": "notepad.exe",
|
||||
"npm_config_engine_strict": "",
|
||||
"npm_config_fetch_retries": "2",
|
||||
"npm_config_fetch_retry_factor": "10",
|
||||
"npm_config_fetch_retry_maxtimeout": "60000",
|
||||
"npm_config_fetch_retry_mintimeout": "10000",
|
||||
"npm_config_force": "",
|
||||
"npm_config_format_package_lock": "true",
|
||||
"npm_config_fund": "true",
|
||||
"npm_config_git": "git",
|
||||
"npm_config_git_tag_version": "true",
|
||||
"npm_config_global": "",
|
||||
"npm_config_globalconfig": "C:\\Users\\nhan\\AppData\\Roaming\\npm\\etc\\npmrc",
|
||||
"npm_config_globalignorefile": "C:\\Users\\nhan\\AppData\\Roaming\\npm\\etc\\npmignore",
|
||||
"npm_config_global_style": "",
|
||||
"npm_config_group": "",
|
||||
"npm_config_ham_it_up": "",
|
||||
"npm_config_heading": "npm",
|
||||
"npm_config_https_proxy": "",
|
||||
"npm_config_if_present": "",
|
||||
"npm_config_ignore_prepublish": "",
|
||||
"npm_config_ignore_scripts": "",
|
||||
"npm_config_init_author_email": "",
|
||||
"npm_config_init_author_name": "",
|
||||
"npm_config_init_author_url": "",
|
||||
"npm_config_init_license": "ISC",
|
||||
"npm_config_init_module": "C:\\Users\\nhan\\.npm-init.js",
|
||||
"npm_config_init_version": "1.0.0",
|
||||
"npm_config_json": "",
|
||||
"npm_config_key": "",
|
||||
"npm_config_legacy_bundling": "",
|
||||
"npm_config_link": "",
|
||||
"npm_config_local_address": "",
|
||||
"npm_config_loglevel": "notice",
|
||||
"npm_config_logs_max": "10",
|
||||
"npm_config_long": "",
|
||||
"npm_config_maxsockets": "50",
|
||||
"npm_config_message": "%s",
|
||||
"npm_config_metrics_registry": "https://registry.npmjs.org/",
|
||||
"npm_config_node_gyp": "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js",
|
||||
"npm_config_node_options": "",
|
||||
"npm_config_node_version": "12.15.0",
|
||||
"npm_config_noproxy": "",
|
||||
"npm_config_offline": "",
|
||||
"npm_config_onload_script": "",
|
||||
"npm_config_only": "",
|
||||
"npm_config_optional": "true",
|
||||
"npm_config_otp": "",
|
||||
"npm_config_package_lock": "true",
|
||||
"npm_config_package_lock_only": "",
|
||||
"npm_config_parseable": "",
|
||||
"npm_config_prefer_offline": "",
|
||||
"npm_config_prefer_online": "",
|
||||
"npm_config_prefix": "C:\\Users\\nhan\\AppData\\Roaming\\npm",
|
||||
"npm_config_preid": "",
|
||||
"npm_config_production": "",
|
||||
"npm_config_progress": "true",
|
||||
"npm_config_proxy": "",
|
||||
"npm_config_read_only": "",
|
||||
"npm_config_rebuild_bundle": "true",
|
||||
"npm_config_registry": "https://registry.npmjs.org/",
|
||||
"npm_config_rollback": "true",
|
||||
"npm_config_save": "true",
|
||||
"npm_config_save_bundle": "",
|
||||
"npm_config_save_dev": "",
|
||||
"npm_config_save_exact": "",
|
||||
"npm_config_save_optional": "",
|
||||
"npm_config_save_prefix": "^",
|
||||
"npm_config_save_prod": "",
|
||||
"npm_config_scope": "",
|
||||
"npm_config_scripts_prepend_node_path": "warn-only",
|
||||
"npm_config_script_shell": "",
|
||||
"npm_config_searchexclude": "",
|
||||
"npm_config_searchlimit": "20",
|
||||
"npm_config_searchopts": "",
|
||||
"npm_config_searchstaleness": "900",
|
||||
"npm_config_send_metrics": "",
|
||||
"npm_config_shell": "C:\\WINDOWS\\system32\\cmd.exe",
|
||||
"npm_config_shrinkwrap": "true",
|
||||
"npm_config_sign_git_commit": "",
|
||||
"npm_config_sign_git_tag": "",
|
||||
"npm_config_sso_poll_frequency": "500",
|
||||
"npm_config_sso_type": "oauth",
|
||||
"npm_config_strict_ssl": "true",
|
||||
"npm_config_tag": "latest",
|
||||
"npm_config_tag_version_prefix": "v",
|
||||
"npm_config_timing": "",
|
||||
"npm_config_tmp": "C:\\Users\\nhan\\AppData\\Local\\Temp",
|
||||
"npm_config_umask": "0000",
|
||||
"npm_config_unicode": "",
|
||||
"npm_config_unsafe_perm": "true",
|
||||
"npm_config_update_notifier": "true",
|
||||
"npm_config_usage": "",
|
||||
"npm_config_user": "",
|
||||
"npm_config_userconfig": "C:\\Users\\nhan\\.npmrc",
|
||||
"npm_config_user_agent": "npm/6.13.4 node/v12.15.0 win32 x64",
|
||||
"npm_config_version": "",
|
||||
"npm_config_versions": "",
|
||||
"npm_config_viewer": "browser",
|
||||
"npm_execpath": "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js",
|
||||
"npm_lifecycle_event": "dev-windows",
|
||||
"npm_lifecycle_script": "set NODE_OPTIONS='--inspect' && set PORT=3005 && next dev",
|
||||
"npm_node_execpath": "C:\\Program Files\\nodejs\\node.exe",
|
||||
"npm_package_dependencies_autoprefixer": "^10.2.6",
|
||||
"npm_package_dependencies_body_scroll_lock": "^3.1.5",
|
||||
"npm_package_dependencies_classnames": "^2.3.1",
|
||||
"npm_package_dependencies_cookie": "^0.4.1",
|
||||
"npm_package_dependencies_email_validator": "^2.0.4",
|
||||
"npm_package_dependencies_eslint": "^7.32.0",
|
||||
"npm_package_dependencies_eslint_config_next": "^11.1.2",
|
||||
"npm_package_dependencies_immutability_helper": "^3.1.1",
|
||||
"npm_package_dependencies_js_cookie": "^2.2.1",
|
||||
"npm_package_dependencies_keen_slider": "^5.5.1",
|
||||
"npm_package_dependencies_lodash_debounce": "^4.0.8",
|
||||
"npm_package_dependencies_lodash_random": "^3.2.0",
|
||||
"npm_package_dependencies_lodash_throttle": "^4.1.1",
|
||||
"npm_package_dependencies_next": "^11.0.0",
|
||||
"npm_package_dependencies_next_seo": "^4.26.0",
|
||||
"npm_package_dependencies_next_themes": "^0.0.14",
|
||||
"npm_package_dependencies_postcss": "^8.3.5",
|
||||
"npm_package_dependencies_postcss_nesting": "^8.0.1",
|
||||
"npm_package_dependencies_react": "^17.0.2",
|
||||
"npm_package_dependencies_react_dom": "^17.0.2",
|
||||
"npm_package_dependencies_react_fast_marquee": "^1.1.4",
|
||||
"npm_package_dependencies_react_merge_refs": "^1.1.0",
|
||||
"npm_package_dependencies_react_player": "^2.9.0",
|
||||
"npm_package_dependencies_react_use_measure": "^2.0.4",
|
||||
"npm_package_dependencies_sass": "^1.38.0",
|
||||
"npm_package_dependencies_swell_js": "^4.0.0-next.0",
|
||||
"npm_package_dependencies_swr": "^0.5.6",
|
||||
"npm_package_dependencies_tabbable": "^5.2.0",
|
||||
"npm_package_dependencies_tailwindcss": "^2.2.2",
|
||||
"npm_package_dependencies_uuidv4": "^6.2.10",
|
||||
"npm_package_dependencies__react_spring_web": "^9.2.1",
|
||||
"npm_package_dependencies__vercel_fetch": "^6.1.0",
|
||||
"npm_package_description": "[](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fcommerce&project-name=commerce&repo-name=commerce&demo-title=Next.js%20Commerce&demo-description=An%20all-in-one%20starter%20kit%20for%20high-performance%20e-commerce%20sites.&demo-url=https%3A%2F%2Fdemo.vercel.store&demo-image=https%3A%2F%2Fbigcommerce-demo-asset-ksvtgfvnd.vercel.app%2Fbigcommerce.png&integration-ids=oac_MuWZiE4jtmQ2ejZQaQ7ncuDT)",
|
||||
"npm_package_devDependencies_deepmerge": "^4.2.2",
|
||||
"npm_package_devDependencies_eslint_config_prettier": "^8.3.0",
|
||||
"npm_package_devDependencies_graphql": "^15.5.1",
|
||||
"npm_package_devDependencies_husky": "^6.0.0",
|
||||
"npm_package_devDependencies_lint_staged": "^11.0.0",
|
||||
"npm_package_devDependencies_postcss_flexbugs_fixes": "^5.0.2",
|
||||
"npm_package_devDependencies_postcss_import": "^14.0.2",
|
||||
"npm_package_devDependencies_postcss_preset_env": "^6.7.0",
|
||||
"npm_package_devDependencies_prettier": "^2.3.0",
|
||||
"npm_package_devDependencies_typescript": "4.3.4",
|
||||
"npm_package_devDependencies__graphql_codegen_cli": "^1.21.5",
|
||||
"npm_package_devDependencies__graphql_codegen_schema_ast": "^1.18.3",
|
||||
"npm_package_devDependencies__graphql_codegen_typescript": "^1.22.2",
|
||||
"npm_package_devDependencies__graphql_codegen_typescript_operations": "^1.18.1",
|
||||
"npm_package_devDependencies__next_bundle_analyzer": "^10.2.3",
|
||||
"npm_package_devDependencies__types_body_scroll_lock": "^2.6.1",
|
||||
"npm_package_devDependencies__types_cookie": "^0.4.0",
|
||||
"npm_package_devDependencies__types_js_cookie": "^2.2.6",
|
||||
"npm_package_devDependencies__types_lodash_debounce": "^4.0.6",
|
||||
"npm_package_devDependencies__types_lodash_random": "^3.2.6",
|
||||
"npm_package_devDependencies__types_lodash_throttle": "^4.1.6",
|
||||
"npm_package_devDependencies__types_node": "^15.12.4",
|
||||
"npm_package_devDependencies__types_react": "^17.0.8",
|
||||
"npm_package_engines_node": ">=14.x",
|
||||
"npm_package_gitHead": "d6a0c41e9987f3d0af8a69c4404152e0ddc1345f",
|
||||
"npm_package_license": "MIT",
|
||||
"npm_package_lint_staged_______js_jsx_ts_tsx__0": "prettier --write",
|
||||
"npm_package_lint_staged_______js_jsx_ts_tsx__1": "git add",
|
||||
"npm_package_lint_staged_______md_mdx_json__0": "prettier --write",
|
||||
"npm_package_lint_staged_______md_mdx_json__1": "git add",
|
||||
"npm_package_name": "nextjs-commerce",
|
||||
"npm_package_next_unused_alias__assets___0": "assets/*",
|
||||
"npm_package_next_unused_alias__components___0": "components/*",
|
||||
"npm_package_next_unused_alias__config___0": "config/*",
|
||||
"npm_package_next_unused_alias__lib___0": "lib/*",
|
||||
"npm_package_next_unused_alias__utils___0": "utils/*",
|
||||
"npm_package_next_unused_debug": "true",
|
||||
"npm_package_next_unused_entrypoints_0": "pages",
|
||||
"npm_package_next_unused_include_0": "components",
|
||||
"npm_package_next_unused_include_1": "lib",
|
||||
"npm_package_next_unused_include_2": "pages",
|
||||
"npm_package_readmeFilename": "README.md",
|
||||
"npm_package_scripts_analyze": "BUNDLE_ANALYZE=both yarn build",
|
||||
"npm_package_scripts_build": "next build",
|
||||
"npm_package_scripts_dev": "NODE_OPTIONS='--inspect' PORT=3005 next dev",
|
||||
"npm_package_scripts_dev_windows": "set NODE_OPTIONS='--inspect' && set PORT=3005 && next dev",
|
||||
"npm_package_scripts_find_unused": "npx next-unused",
|
||||
"npm_package_scripts_generate": "graphql-codegen",
|
||||
"npm_package_scripts_generate_definitions": "node framework/bigcommerce/scripts/generate-definitions.js",
|
||||
"npm_package_scripts_generate_shopify": "DOTENV_CONFIG_PATH=./.env.local graphql-codegen -r dotenv/config --config framework/shopify/codegen.json",
|
||||
"npm_package_scripts_generate_vendure": "graphql-codegen --config framework/vendure/codegen.json",
|
||||
"npm_package_scripts_prettier_fix": "prettier --write .",
|
||||
"npm_package_scripts_start": "next start",
|
||||
"npm_package_sideEffects": "false",
|
||||
"npm_package_version": "1.0.0",
|
||||
"NPM_PREFIX_NPM_CLI_JS": "C:\\Users\\nhan\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js",
|
||||
"NUMBER_OF_PROCESSORS": "4",
|
||||
"OneDrive": "C:\\Users\\nhan\\OneDrive",
|
||||
"OneDriveConsumer": "C:\\Users\\nhan\\OneDrive",
|
||||
"OPENSSL_CONF": "C:\\Program Files\\PostgreSQL\\psqlODBC\\etc\\openssl.cnf",
|
||||
"ORIGINAL_XDG_CURRENT_DESKTOP": "undefined",
|
||||
"OS": "Windows_NT",
|
||||
"Path": "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\npm-lifecycle\\node-gyp-bin;G:\\hoc-fpt-2\\làm việc\\kie\\work\\grocery-vercel-commerce\\node_modules\\.bin;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Java\\jdk1.8.0_231\\bin;C:\\Program Files\\nodejs\\;C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\MongoDB\\Server\\4.2\\bin;;C:\\Program Files\\Git LFS;D:\\hoc-fpt\\code-tren-lop\\php\\xampp3\\php;C:\\ProgramData\\ComposerSetup\\bin;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\AdoptOpenJDK\\jdk8u192-b12\\bin;C:\\Program Files\\Java\\jdk1.8.0_211\\bin;C:\\Android\\android-sdk\\tools;C:\\Android\\android-sdk\\platform-tools;C:\\Android\\android-sdk\\tools\\bin;C:\\Program Files\\MySQL\\MySQL Shell 8.0\\bin\\;C:\\Program Files\\Java\\jdk1.8.0_231\\bin;C:\\Users\\nhan\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\nhan\\AppData\\Roaming\\npm;C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin;C:\\Program Files\\heroku\\bin;C:\\Users\\nhan\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\nhan\\AppData\\Roaming\\Composer\\vendor\\bin",
|
||||
"PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JSE;.WSF;.WSH;.MSC;.CPL",
|
||||
"PORT": "3005 ",
|
||||
"PROCESSOR_ARCHITECTURE": "AMD64",
|
||||
"PROCESSOR_IDENTIFIER": "Intel64 Family 6 Model 58 Stepping 9, GenuineIntel",
|
||||
"PROCESSOR_LEVEL": "6",
|
||||
"PROCESSOR_REVISION": "3a09",
|
||||
"ProgramData": "C:\\ProgramData",
|
||||
"ProgramFiles": "C:\\Program Files",
|
||||
"ProgramFiles(x86)": "C:\\Program Files (x86)",
|
||||
"ProgramW6432": "C:\\Program Files",
|
||||
"PROMPT": "$P$G",
|
||||
"PSModulePath": "C:\\Users\\nhan\\Documents\\WindowsPowerShell\\Modules;C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules",
|
||||
"PUBLIC": "C:\\Users\\Public",
|
||||
"SESSIONNAME": "Console",
|
||||
"SystemDrive": "C:",
|
||||
"SystemRoot": "C:\\WINDOWS",
|
||||
"TEMP": "C:\\Users\\nhan\\AppData\\Local\\Temp",
|
||||
"TERM_PROGRAM": "vscode",
|
||||
"TERM_PROGRAM_VERSION": "1.60.0",
|
||||
"TMP": "C:\\Users\\nhan\\AppData\\Local\\Temp",
|
||||
"TRACE_ID": "9bcaa92ba218c9e0",
|
||||
"USERDOMAIN": "DESKTOP-TILU55O",
|
||||
"USERDOMAIN_ROAMINGPROFILE": "DESKTOP-TILU55O",
|
||||
"USERNAME": "nhan",
|
||||
"USERPROFILE": "C:\\Users\\nhan",
|
||||
"VSCODE_GIT_ASKPASS_MAIN": "c:\\Users\\nhan\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\extensions\\git\\dist\\askpass-main.js",
|
||||
"VSCODE_GIT_ASKPASS_NODE": "C:\\Users\\nhan\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe",
|
||||
"VSCODE_GIT_IPC_HANDLE": "\\\\.\\pipe\\vscode-git-d5d8071aa9-sock",
|
||||
"windir": "C:\\WINDOWS",
|
||||
"_prog": "node",
|
||||
"__NEXT_PROCESSED_ENV": "true"
|
||||
},
|
||||
"sharedObjects": [
|
||||
"C:\\Program Files\\nodejs\\node.exe",
|
||||
"C:\\WINDOWS\\SYSTEM32\\ntdll.dll",
|
||||
"C:\\WINDOWS\\System32\\KERNEL32.DLL",
|
||||
"C:\\WINDOWS\\System32\\KERNELBASE.dll",
|
||||
"C:\\WINDOWS\\System32\\WS2_32.dll",
|
||||
"C:\\WINDOWS\\System32\\RPCRT4.dll",
|
||||
"C:\\WINDOWS\\System32\\ADVAPI32.dll",
|
||||
"C:\\WINDOWS\\System32\\msvcrt.dll",
|
||||
"C:\\WINDOWS\\System32\\sechost.dll",
|
||||
"C:\\WINDOWS\\System32\\USER32.dll",
|
||||
"C:\\WINDOWS\\System32\\win32u.dll",
|
||||
"C:\\WINDOWS\\System32\\GDI32.dll",
|
||||
"C:\\WINDOWS\\System32\\gdi32full.dll",
|
||||
"C:\\WINDOWS\\System32\\msvcp_win.dll",
|
||||
"C:\\WINDOWS\\System32\\ucrtbase.dll",
|
||||
"C:\\WINDOWS\\System32\\PSAPI.DLL",
|
||||
"C:\\WINDOWS\\System32\\CRYPT32.dll",
|
||||
"C:\\WINDOWS\\System32\\bcrypt.dll",
|
||||
"C:\\WINDOWS\\SYSTEM32\\dbghelp.dll",
|
||||
"C:\\WINDOWS\\SYSTEM32\\IPHLPAPI.DLL",
|
||||
"C:\\WINDOWS\\SYSTEM32\\USERENV.dll",
|
||||
"C:\\WINDOWS\\SYSTEM32\\WINMM.dll",
|
||||
"C:\\WINDOWS\\System32\\IMM32.DLL",
|
||||
"C:\\WINDOWS\\SYSTEM32\\powrprof.dll",
|
||||
"C:\\WINDOWS\\SYSTEM32\\UMPDC.dll",
|
||||
"C:\\WINDOWS\\SYSTEM32\\CRYPTBASE.DLL",
|
||||
"C:\\WINDOWS\\system32\\uxtheme.dll",
|
||||
"C:\\WINDOWS\\System32\\combase.dll",
|
||||
"C:\\WINDOWS\\system32\\mswsock.dll",
|
||||
"C:\\WINDOWS\\SYSTEM32\\kernel.appcore.dll",
|
||||
"C:\\WINDOWS\\System32\\bcryptprimitives.dll",
|
||||
"C:\\WINDOWS\\System32\\NSI.dll",
|
||||
"C:\\WINDOWS\\SYSTEM32\\dhcpcsvc6.DLL",
|
||||
"C:\\WINDOWS\\SYSTEM32\\dhcpcsvc.DLL",
|
||||
"C:\\WINDOWS\\SYSTEM32\\DNSAPI.dll",
|
||||
"C:\\WINDOWS\\system32\\napinsp.dll",
|
||||
"C:\\WINDOWS\\system32\\pnrpnsp.dll",
|
||||
"C:\\WINDOWS\\system32\\wshbth.dll",
|
||||
"C:\\WINDOWS\\system32\\NLAapi.dll",
|
||||
"C:\\WINDOWS\\System32\\winrnr.dll",
|
||||
"C:\\Windows\\System32\\rasadhlp.dll",
|
||||
"C:\\WINDOWS\\System32\\fwpuclnt.dll"
|
||||
]
|
||||
}
|
21
src/components/common/CustomShapeSvg/CustomShapeSvg.tsx
Normal file
21
src/components/common/CustomShapeSvg/CustomShapeSvg.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
const CustomShapeSvg = () => {
|
||||
return (
|
||||
<>
|
||||
<svg width="0" height="0" viewBox="0 0 1 1" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<clipPath id="svg-custom-shape" clipPathUnits="objectBoundingBox">
|
||||
<path
|
||||
d="M0.0172975 0.136181C0.0343229 -0.030626 0.360144 0.00272041 0.510753 0.00272041C0.640763 0.00272041 0.779987 0.0273237 0.944182 0.0678791C0.966966 0.0735065 0.986 0.126214 0.990073 0.19938C0.994835 0.284918 1 0.404512 1 0.520863C1 0.736726 0.993726 0.834689 0.982222 0.886228C0.943784 1.05844 0.733836 0.983992 0.493833 0.983992C0.30975 0.983992 0.127708 0.957276 0.052872 0.944826C0.0312385 0.941228 0.0126875 0.895116 0.00839312 0.826023C0.00415553 0.757843 0 0.662594 0 0.551233C0 0.345672 0.000272106 0.302988 0.0172975 0.136181Z"
|
||||
fill="#B5B5B5" />
|
||||
</clipPath>
|
||||
</svg>
|
||||
<svg width="0" height="0" viewBox="0 0 1 1" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<clipPath id="svg-custom-shape-lg" clipPathUnits="objectBoundingBox">
|
||||
<path d="M0.00309475 0.648049L0.016817 0.981984H0.165017L0.368106 0.987044C0.428484 0.985357 0.660022 0.997877 0.750058 0.998542C0.845065 0.999243 0.83562 1.00172 0.881179 0.998007C0.938818 0.993313 0.955418 0.966805 0.96914 0.941507C0.982862 0.916209 0.99209 0.790258 0.99384 0.76948C0.995632 0.748196 1.00207 0.572154 0.999329 0.425425C0.996584 0.278696 0.977373 0.0408933 0.96914 0.0257144C0.960907 0.0105355 0.546495 0.000416471 0.532773 0.000416471C0.519051 0.000416471 0.329256 -0.00466047 0.156356 0.0206377C-0.0165445 0.0459358 0.0135012 0.0186561 0.00526778 0.180564C-0.00116735 0.30711 -0.00147933 0.563722 0.00309475 0.648049Z" fill="#C4C4C4" />
|
||||
</clipPath>
|
||||
</svg>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default CustomShapeSvg
|
16
src/components/common/CustomShapeSvg/ViewAllItem.module.scss
Normal file
16
src/components/common/CustomShapeSvg/ViewAllItem.module.scss
Normal file
@@ -0,0 +1,16 @@
|
||||
@import "../../../styles/utilities";
|
||||
|
||||
.viewAll {
|
||||
display: flex;
|
||||
.content {
|
||||
color: var(--primary);
|
||||
margin: 0.8rem 0.8rem 0.8rem 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
.vector {
|
||||
margin: 0.8rem 0rem 0.8rem 0rem;
|
||||
svg path {
|
||||
fill: var(--primary);
|
||||
}
|
||||
}
|
||||
}
|
16
src/components/common/EmptyCommon/EmptyCommon.module.scss
Normal file
16
src/components/common/EmptyCommon/EmptyCommon.module.scss
Normal file
@@ -0,0 +1,16 @@
|
||||
@import "../../../styles/utilities";
|
||||
|
||||
.empty {
|
||||
padding: 1.6rem;
|
||||
margin: auto;
|
||||
.imgWrap {
|
||||
min-width: 10rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.description {
|
||||
color: var(--disabled);
|
||||
text-align: center;
|
||||
margin-top: .8rem;
|
||||
}
|
||||
}
|
25
src/components/common/EmptyCommon/EmptyCommon.tsx
Normal file
25
src/components/common/EmptyCommon/EmptyCommon.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import { StaticImage } from '..';
|
||||
import EmptyImg from './empty.png';
|
||||
import s from './EmptyCommon.module.scss';
|
||||
|
||||
|
||||
interface Props {
|
||||
description?: string
|
||||
}
|
||||
|
||||
const EmptyCommon = ({ description = "No data to display" }: Props) => {
|
||||
return (
|
||||
<div className={s.empty}>
|
||||
<div className={s.imgWrap}>
|
||||
<StaticImage src={EmptyImg} alt="empty" />
|
||||
</div>
|
||||
{
|
||||
description && <div className={s.description}>
|
||||
{description}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default EmptyCommon
|
BIN
src/components/common/EmptyCommon/empty.png
Normal file
BIN
src/components/common/EmptyCommon/empty.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
33
src/components/common/EmptyCommon/empty.svg
Normal file
33
src/components/common/EmptyCommon/empty.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 18 KiB |
@@ -1,10 +1,14 @@
|
||||
@import "../../../styles/utilities";
|
||||
|
||||
.header {
|
||||
@apply sticky bg-white shadow-md;
|
||||
@apply sticky bg-white;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 9999;
|
||||
margin-bottom: 3.2rem;
|
||||
@screen md {
|
||||
@apply relative;
|
||||
}
|
||||
&.full {
|
||||
@apply shadow-none;
|
||||
border: 1px solid var(--border-line);
|
||||
@@ -17,3 +21,27 @@
|
||||
@apply font-logo;
|
||||
}
|
||||
}
|
||||
|
||||
.headerSticky {
|
||||
@apply sticky bg-white shadow-md;
|
||||
display: none;
|
||||
padding-left: 3.2rem;
|
||||
padding-right: 3.2rem;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 10000;
|
||||
transition: all 0.2s;
|
||||
&.show {
|
||||
display: block;
|
||||
animation: showHeaderSticky 0.2s;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes showHeaderSticky {
|
||||
0% {
|
||||
transform: translateY(-7rem);
|
||||
}
|
||||
100% {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import classNames from 'classnames'
|
||||
import React, { memo, useEffect, useState } from 'react'
|
||||
import React, { memo, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { useModalCommon } from 'src/components/hooks'
|
||||
import { isMobile } from 'src/utils/funtion.utils'
|
||||
import ModalAuthenticate from '../ModalAuthenticate/ModalAuthenticate'
|
||||
@@ -9,43 +9,64 @@ import HeaderMenu from './components/HeaderMenu/HeaderMenu'
|
||||
import HeaderSubMenu from './components/HeaderSubMenu/HeaderSubMenu'
|
||||
import HeaderSubMenuMobile from './components/HeaderSubMenuMobile/HeaderSubMenuMobile'
|
||||
import s from './Header.module.scss'
|
||||
interface props {
|
||||
toggleFilter:()=>void
|
||||
}
|
||||
|
||||
|
||||
const Header = memo(() => {
|
||||
const Header = memo(({toggleFilter}:props) => {
|
||||
const headeFullRef = useRef<HTMLDivElement>(null)
|
||||
const [isFullHeader, setIsFullHeader] = useState<boolean>(true)
|
||||
const { visible: visibleModalAuthen, closeModal: closeModalAuthen, openModal: openModalAuthen } = useModalCommon({ initialValue: false })
|
||||
const { visible: visibleModalInfo, closeModal: closeModalInfo, openModal: openModalInfo } = useModalCommon({ initialValue: false })
|
||||
|
||||
const headerHeight = useMemo(() => {
|
||||
return headeFullRef.current?.offsetHeight
|
||||
}, [headeFullRef.current])
|
||||
|
||||
useEffect(() => {
|
||||
const handleScroll = () => {
|
||||
if (!isMobile()) {
|
||||
if (!headerHeight || window.scrollY > headerHeight) {
|
||||
setIsFullHeader(false)
|
||||
} else {
|
||||
setIsFullHeader(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
window.addEventListener('scroll', handleScroll)
|
||||
return () => {
|
||||
window.removeEventListener('scroll', handleScroll)
|
||||
}
|
||||
}, [])
|
||||
}, [headerHeight])
|
||||
|
||||
const handleScroll = () => {
|
||||
if (!isMobile()) {
|
||||
if (window.scrollY === 0) {
|
||||
setIsFullHeader(true)
|
||||
} else {
|
||||
setIsFullHeader(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<header className={classNames({ [s.header]: true, [s.full]: isFullHeader })}>
|
||||
<HeaderHighLight isShow={isFullHeader} />
|
||||
<header ref={headeFullRef} className={classNames({ [s.header]: true, [s.full]: isFullHeader })}>
|
||||
<HeaderHighLight />
|
||||
<div className={s.menu}>
|
||||
<HeaderMenu isFull={isFullHeader}
|
||||
<HeaderMenu
|
||||
toggleFilter={toggleFilter}
|
||||
isFull={isFullHeader}
|
||||
openModalAuthen={openModalAuthen}
|
||||
openModalInfo={openModalInfo} />
|
||||
<HeaderSubMenu isShow={isFullHeader} />
|
||||
<HeaderSubMenu />
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
<div className={classNames({
|
||||
[s.headerSticky]: true,
|
||||
[s.show]: !isFullHeader
|
||||
})}>
|
||||
<HeaderMenu isFull={isFullHeader}
|
||||
toggleFilter={toggleFilter}
|
||||
openModalAuthen={openModalAuthen}
|
||||
openModalInfo={openModalInfo} />
|
||||
</div>
|
||||
|
||||
<HeaderSubMenuMobile />
|
||||
<ModalAuthenticate visible={visibleModalAuthen} closeModal={closeModalAuthen} />
|
||||
<ModalCreateUserInfo demoVisible={visibleModalInfo} demoCloseModal={closeModalInfo}/>
|
||||
<ModalCreateUserInfo demoVisible={visibleModalInfo} demoCloseModal={closeModalInfo} />
|
||||
</>
|
||||
)
|
||||
})
|
||||
|
@@ -3,37 +3,21 @@
|
||||
.headerHighLight {
|
||||
@apply hidden;
|
||||
@screen md {
|
||||
transform: translateY(-10rem);
|
||||
height: 0;
|
||||
&.show {
|
||||
@apply flex justify-between items-center spacing-horizontal bg-primary caption;
|
||||
animation: showHeaderHightlight 0.2s;
|
||||
height: unset;
|
||||
transform: none;
|
||||
padding-top: 0.8rem;
|
||||
padding-bottom: 0.8rem;
|
||||
color: var(--white);
|
||||
.menu {
|
||||
@apply flex items-center list-none;
|
||||
padding: 0.8rem 0;
|
||||
li {
|
||||
&:not(:last-child) {
|
||||
margin-right: 3.2rem;
|
||||
}
|
||||
a {
|
||||
@appy no-underline;
|
||||
}
|
||||
@apply flex justify-between items-center spacing-horizontal bg-primary caption;
|
||||
padding-top: 0.8rem;
|
||||
padding-bottom: 0.8rem;
|
||||
color: var(--white);
|
||||
.menu {
|
||||
@apply flex items-center list-none;
|
||||
padding: 0.8rem 0;
|
||||
li {
|
||||
&:not(:last-child) {
|
||||
margin-right: 3.2rem;
|
||||
}
|
||||
a {
|
||||
@appy no-underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes showHeaderHightlight {
|
||||
0% {
|
||||
transform: translateY(-4rem);
|
||||
}
|
||||
100% {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import classNames from 'classnames'
|
||||
import Link from 'next/link'
|
||||
import { memo, useEffect, useRef } from 'react'
|
||||
import { memo } from 'react'
|
||||
import { ROUTE } from 'src/utils/constanst.utils'
|
||||
import s from './HeaderHighLight.module.scss'
|
||||
|
||||
@@ -19,14 +18,9 @@ const MENU = [
|
||||
},
|
||||
]
|
||||
|
||||
interface Props {
|
||||
children?: any,
|
||||
isShow: boolean,
|
||||
}
|
||||
|
||||
const HeaderHighLight = memo(({ isShow }: Props) => {
|
||||
const HeaderHighLight = memo(() => {
|
||||
return (
|
||||
<section className={classNames({ [s.headerHighLight]: true, [s.show]: isShow })}>
|
||||
<section className={s.headerHighLight}>
|
||||
<div>
|
||||
Free Shipping on order $49+ / Express $99+
|
||||
</div>
|
||||
|
@@ -15,7 +15,16 @@
|
||||
.left {
|
||||
.top {
|
||||
@apply flex justify-between items-center;
|
||||
.iconGroup{
|
||||
@apply flex justify-between items-center;
|
||||
}
|
||||
.iconCart {
|
||||
margin-left: 1.6rem;
|
||||
}
|
||||
.iconFilter{
|
||||
@screen md {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.inputSearch {
|
||||
@@ -62,6 +71,11 @@
|
||||
}
|
||||
}
|
||||
.btnCart {
|
||||
all: unset;
|
||||
cursor: pointer;
|
||||
&:focus-visible {
|
||||
outline: 2px solid #000;
|
||||
}
|
||||
&:hover {
|
||||
svg path {
|
||||
fill: var(--primary);
|
||||
@@ -71,5 +85,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@screen xl {
|
||||
.iconFilterDesk {
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -3,19 +3,23 @@ import Link from 'next/link'
|
||||
import { memo, useMemo } from 'react'
|
||||
import InputSearch from 'src/components/common/InputSearch/InputSearch'
|
||||
import MenuDropdown from 'src/components/common/MenuDropdown/MenuDropdown'
|
||||
import { IconBuy, IconHeart, IconHistory, IconUser } from 'src/components/icons'
|
||||
import { IconBuy, IconFilter, IconHeart, IconHistory, IconUser } from 'src/components/icons'
|
||||
import { ACCOUNT_TAB, QUERY_KEY, ROUTE } from 'src/utils/constanst.utils'
|
||||
import Logo from '../../../Logo/Logo'
|
||||
import s from './HeaderMenu.module.scss'
|
||||
|
||||
import { useRouter } from 'next/router'
|
||||
interface Props {
|
||||
children?: any,
|
||||
isFull: boolean,
|
||||
openModalAuthen: () => void,
|
||||
openModalInfo: () => void,
|
||||
toggleFilter:() => void,
|
||||
}
|
||||
|
||||
const HeaderMenu = memo(({ isFull, openModalAuthen, openModalInfo }: Props) => {
|
||||
const FILTER_PAGE = [ROUTE.HOME,ROUTE.PRODUCTS]
|
||||
|
||||
const HeaderMenu = memo(({ isFull, openModalAuthen, openModalInfo, toggleFilter }: Props) => {
|
||||
const router = useRouter()
|
||||
const optionMenu = useMemo(() => [
|
||||
{
|
||||
onClick: openModalAuthen,
|
||||
@@ -35,15 +39,24 @@ const HeaderMenu = memo(({ isFull, openModalAuthen, openModalInfo }: Props) => {
|
||||
},
|
||||
|
||||
], [openModalAuthen])
|
||||
|
||||
return (
|
||||
<section className={classNames({ [s.headerMenu]: true, [s.full]: isFull })}>
|
||||
<div className={s.left}>
|
||||
<div className={s.top}>
|
||||
<Logo/>
|
||||
<button className={s.iconCart}>
|
||||
<IconBuy />
|
||||
</button>
|
||||
<div className={s.iconGroup}>
|
||||
{
|
||||
FILTER_PAGE.includes(router.pathname) && (
|
||||
<button className={s.iconFilter} onClick={toggleFilter}>
|
||||
<IconFilter/>
|
||||
</button>
|
||||
)
|
||||
}
|
||||
<button className={s.iconCart}>
|
||||
<IconBuy />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div className={s.inputSearch}>
|
||||
<InputSearch />
|
||||
@@ -72,6 +85,16 @@ const HeaderMenu = memo(({ isFull, openModalAuthen, openModalInfo }: Props) => {
|
||||
<IconBuy />
|
||||
</button>
|
||||
</li>
|
||||
|
||||
{
|
||||
FILTER_PAGE.includes(router.pathname) && (
|
||||
<li className={s.iconFilterDesk}>
|
||||
<button className={s.iconFilter} onClick={toggleFilter}>
|
||||
<IconFilter/>
|
||||
</button>
|
||||
</li>
|
||||
)
|
||||
}
|
||||
</ul>
|
||||
</section>
|
||||
)
|
||||
|
@@ -3,38 +3,34 @@
|
||||
.headerSubMenu {
|
||||
@apply hidden;
|
||||
@screen md {
|
||||
transform: translateY(-10rem);
|
||||
height: 0;
|
||||
&.show {
|
||||
@apply block;
|
||||
padding-bottom: 2.4rem;
|
||||
transform: none;
|
||||
height: unset;
|
||||
@apply block;
|
||||
padding-bottom: 2.4rem;
|
||||
transform: none;
|
||||
height: unset;
|
||||
@screen lg {
|
||||
@apply flex justify-between items-center;
|
||||
}
|
||||
.menu {
|
||||
@apply flex items-center list-none;
|
||||
margin-bottom: 2.4rem;
|
||||
@screen lg {
|
||||
@apply flex justify-between items-center;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.menu {
|
||||
@apply flex items-center list-none;
|
||||
margin-bottom: 2.4rem;
|
||||
@screen lg {
|
||||
margin-bottom: 0;
|
||||
li {
|
||||
&:not(:last-child) {
|
||||
margin-right: 2.4rem;
|
||||
@screen lg {
|
||||
margin-right: 4rem;
|
||||
}
|
||||
}
|
||||
li {
|
||||
&:not(:last-child) {
|
||||
margin-right: 2.4rem;
|
||||
@screen lg {
|
||||
margin-right: 4rem;
|
||||
}
|
||||
}
|
||||
a {
|
||||
@appy no-underline;
|
||||
}
|
||||
&:hover {
|
||||
@apply text-primary;
|
||||
}
|
||||
&.active {
|
||||
@apply text-primary;
|
||||
}
|
||||
a {
|
||||
@appy no-underline;
|
||||
}
|
||||
&:hover {
|
||||
@apply text-primary;
|
||||
}
|
||||
&.active {
|
||||
@apply text-primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -53,16 +53,12 @@ const CATEGORY = [
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.BRAND}=sauce`,
|
||||
},
|
||||
]
|
||||
interface Props {
|
||||
children?: any,
|
||||
isShow: boolean,
|
||||
}
|
||||
|
||||
const HeaderSubMenu = memo(({ isShow }: Props) => {
|
||||
const HeaderSubMenu = memo(() => {
|
||||
const router = useRouter()
|
||||
|
||||
return (
|
||||
<section className={classNames({ [s.headerSubMenu]: true, [s.show]: isShow })}>
|
||||
<section className={s.headerSubMenu}>
|
||||
<ul className={s.menu}>
|
||||
{/* todo: handle active item */}
|
||||
<li>
|
||||
|
@@ -5,5 +5,8 @@
|
||||
height: 100%;
|
||||
img {
|
||||
object-fit: cover;
|
||||
background-size: contain !important;
|
||||
background-position: center !important;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import React from 'react'
|
||||
import s from './ImgWithLink.module.scss'
|
||||
import Image from 'next/image'
|
||||
import { BLUR_DATA_IMG } from 'src/utils/constanst.utils'
|
||||
|
||||
export interface ImgWithLinkProps {
|
||||
src: string,
|
||||
@@ -10,7 +11,12 @@ export interface ImgWithLinkProps {
|
||||
const ImgWithLink = ({ src, alt }: ImgWithLinkProps) => {
|
||||
return (
|
||||
<div className={s.imgWithLink}>
|
||||
<Image src={src} alt={alt} layout="fill" className={s.imgWithLink} />
|
||||
<Image src={src} alt={alt}
|
||||
layout="fill"
|
||||
className={s.imgWithLink}
|
||||
placeholder="blur"
|
||||
blurDataURL={BLUR_DATA_IMG}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
@@ -6,3 +6,8 @@
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
.filter{
|
||||
@screen md {
|
||||
display: none;
|
||||
}
|
||||
}
|
@@ -1,10 +1,13 @@
|
||||
import { CommerceProvider } from '@framework'
|
||||
import { useRouter } from 'next/router'
|
||||
import { FC } from 'react'
|
||||
import { FilterProvider } from 'src/components/contexts/FilterContext'
|
||||
import { useModalCommon } from 'src/components/hooks'
|
||||
import { CartDrawer } from '..'
|
||||
import { BRAND, CATEGORY, FEATURED } from 'src/utils/constanst.utils'
|
||||
import { CartDrawer, CustomShapeSvg } from '..'
|
||||
import Footer from '../Footer/Footer'
|
||||
import Header from '../Header/Header'
|
||||
import MenuNavigationProductList from '../MenuNavigationProductList/MenuNavigationProductList'
|
||||
import s from './Layout.module.scss'
|
||||
|
||||
interface Props {
|
||||
@@ -16,6 +19,7 @@ interface Props {
|
||||
const Layout: FC<Props> = ({ children }) => {
|
||||
const { locale = 'en-US' } = useRouter()
|
||||
const { visible: visibleCartDrawer, openModal, closeModal: closeCartDrawer } = useModalCommon({ initialValue: false })
|
||||
const { visible: visibleFilter, openModal: openFilter, closeModal: closeFilter } = useModalCommon({ initialValue: false })
|
||||
|
||||
const toggle = () => {
|
||||
if (visibleCartDrawer) {
|
||||
@@ -24,17 +28,27 @@ const Layout: FC<Props> = ({ children }) => {
|
||||
openModal()
|
||||
}
|
||||
}
|
||||
const toggleFilter = () => {
|
||||
console.log("click")
|
||||
if (visibleFilter) {
|
||||
closeFilter()
|
||||
} else {
|
||||
openFilter()
|
||||
}
|
||||
}
|
||||
return (
|
||||
<CommerceProvider locale={locale}>
|
||||
<div className={s.mainLayout}>
|
||||
<Header />
|
||||
<main >{children}</main>
|
||||
<button onClick={toggle}>toggle card: {visibleCartDrawer.toString()}</button>
|
||||
<CartDrawer
|
||||
visible={visibleCartDrawer}
|
||||
onClose={closeCartDrawer} />
|
||||
<Footer />
|
||||
</div>
|
||||
<div className={s.mainLayout}>
|
||||
<Header toggleFilter={toggleFilter}/>
|
||||
<main >{children}</main>
|
||||
<button onClick={toggle}>toggle card: {visibleCartDrawer.toString()}</button>
|
||||
<CustomShapeSvg/>
|
||||
<CartDrawer
|
||||
visible={visibleCartDrawer}
|
||||
onClose={closeCartDrawer} />
|
||||
<div className={s.filter}><MenuNavigationProductList categories={CATEGORY} brands={BRAND} featured={FEATURED} visible={visibleFilter} onClose={closeFilter}/> </div>
|
||||
<Footer />
|
||||
</div>
|
||||
</CommerceProvider>
|
||||
|
||||
)
|
||||
|
@@ -1,9 +1,7 @@
|
||||
@import "../../../styles/utilities";
|
||||
.menuFilterWrapper{
|
||||
@apply spacing-horizontal;
|
||||
|
||||
@screen md {
|
||||
@apply hidden;
|
||||
}
|
||||
.menuFilterHeading{
|
||||
@apply sub-headline font-bold ;
|
||||
color: var(--text-active);
|
||||
@@ -16,7 +14,7 @@
|
||||
box-sizing: border-box;
|
||||
&::after{
|
||||
@apply absolute;
|
||||
top: 110%;
|
||||
bottom: -1rem;
|
||||
content: "";
|
||||
width: 100%;
|
||||
border-bottom: 1px solid var(--border-line);
|
||||
|
@@ -5,37 +5,67 @@
|
||||
}
|
||||
}
|
||||
.menuNavigationProductListMobile{
|
||||
@apply hidden;
|
||||
@apply relative transition-all duration-100;
|
||||
|
||||
|
||||
&.isShow{
|
||||
@apply block;
|
||||
@screen md {
|
||||
@apply hidden;
|
||||
&::after{
|
||||
content: "";
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
z-index: 9999;
|
||||
}
|
||||
}
|
||||
.menuNavigationProductModal{
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
@apply transition-all duration-200;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
height: 100vh;
|
||||
z-index: 10000;
|
||||
transform: translateY(100%);
|
||||
|
||||
&.animation{
|
||||
transform: translateY(0%)
|
||||
}
|
||||
.content{
|
||||
@apply spacing-horizontal;
|
||||
@apply relative w-full h-full;
|
||||
margin-top: 3rem;
|
||||
padding-top: 2rem ;
|
||||
padding-bottom: 5rem;
|
||||
padding-top: 8rem ;
|
||||
padding-bottom: 10rem;
|
||||
background-color: white;
|
||||
overflow: auto;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
height: 100vh;
|
||||
border-radius: 2.4rem 2.4rem 0 0;
|
||||
.head{
|
||||
@apply flex justify-between;
|
||||
@apply flex justify-between fixed;
|
||||
top:0;
|
||||
left:0;
|
||||
margin-top: 3rem;
|
||||
border-radius: 2.4rem 2.4rem 0 0;
|
||||
padding: 3rem 2rem 1rem 2rem;
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
z-index: 10000;
|
||||
h3{
|
||||
@apply heading-3 font-bold;
|
||||
color:var(--text-base);
|
||||
}
|
||||
}
|
||||
.foot{
|
||||
@apply fixed;
|
||||
bottom: 0;
|
||||
left:0;
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
padding: 0 1rem 2rem 1rem;
|
||||
}
|
||||
button{
|
||||
margin-top: 2rem;
|
||||
width: 100%;
|
||||
|
@@ -12,12 +12,13 @@ interface Props{
|
||||
categories:{name:string,link:string}[],
|
||||
brands:{name:string,link:string}[],
|
||||
featured:{name:string,link:string}[],
|
||||
visible: boolean,
|
||||
onClose: () => void
|
||||
}
|
||||
|
||||
const MenuNavigationProductList = ({categories,brands,featured}:Props)=>{
|
||||
const MenuNavigationProductList = ({categories,brands,featured,visible,onClose}:Props)=>{
|
||||
|
||||
const [dataSort,setDataSort] = useState({});
|
||||
const [isShow,setIsShow] = useState(true);
|
||||
|
||||
function handleValue(value:Object){
|
||||
setDataSort({...dataSort,...value});
|
||||
@@ -25,12 +26,6 @@ const MenuNavigationProductList = ({categories,brands,featured}:Props)=>{
|
||||
function filter(){
|
||||
console.log(dataSort)
|
||||
}
|
||||
|
||||
function hideMenu(){
|
||||
if(isShow === true){
|
||||
setIsShow(false);
|
||||
}
|
||||
}
|
||||
return(
|
||||
<>
|
||||
<div className={s.menuNavigationProductListDesktop}>
|
||||
@@ -38,18 +33,20 @@ const MenuNavigationProductList = ({categories,brands,featured}:Props)=>{
|
||||
<MenuNavigation categories={brands} heading="Brands"/>
|
||||
<MenuNavigation categories={featured} heading="Featured"/>
|
||||
</div>
|
||||
<div className={classNames({ [s.menuNavigationProductListMobile] :true,[s.isShow]: isShow})}>
|
||||
<div className={s.menuNavigationProductModal}>
|
||||
<div className={classNames({ [s.menuNavigationProductListMobile] :true,[s.isShow]: visible})}>
|
||||
<div className={classNames({ [s.menuNavigationProductModal] :true,[s.animation]: visible})}>
|
||||
<div className={s.content}>
|
||||
<div className={s.head}>
|
||||
<h3>FILTER</h3>
|
||||
<div onClick={hideMenu}><IconHide/></div>
|
||||
<div onClick={onClose}><IconHide/></div>
|
||||
</div>
|
||||
<MenuFilter categories={categories} heading="Categories" type="category" onChangeValue={handleValue}/>
|
||||
<MenuFilter categories={brands} heading="Brand" type="brand" onChangeValue={handleValue}/>
|
||||
<MenuFilter categories={featured} heading="Featured" type="featured" onChangeValue={handleValue}/>
|
||||
<MenuSort heading="SORT BY" type="sort" onChangeValue={handleValue}/>
|
||||
<ButtonCommon size="large" onClick={filter}>{LANGUAGE.BUTTON_LABEL.CONFIRM}</ButtonCommon>
|
||||
<div className={s.foot}>
|
||||
<ButtonCommon size="large" onClick={filter}>{LANGUAGE.BUTTON_LABEL.CONFIRM}</ButtonCommon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1,9 +1,7 @@
|
||||
@import "../../../../styles/utilities";
|
||||
.menuSortWrapper{
|
||||
@apply spacing-horizontal;
|
||||
|
||||
@screen md {
|
||||
@apply hidden;
|
||||
}
|
||||
.menuSortHeading{
|
||||
@apply sub-headline font-bold ;
|
||||
color: var(--text-active);
|
||||
@@ -11,14 +9,9 @@
|
||||
margin: 0.8rem 0;
|
||||
}
|
||||
.menuSortList{
|
||||
margin-bottom: 2rem;
|
||||
box-sizing: border-box;
|
||||
&::after{
|
||||
@apply absolute;
|
||||
top: 110%;
|
||||
content: "";
|
||||
width: 100%;
|
||||
border-bottom: 1px solid var(--border-line);
|
||||
}
|
||||
|
||||
li{
|
||||
div{
|
||||
height: 4.8rem;
|
||||
|
@@ -0,0 +1,5 @@
|
||||
.staticImage {
|
||||
img {
|
||||
@apply w-full h-full;
|
||||
}
|
||||
}
|
16
src/components/common/StaticImage/StaticImage.tsx
Normal file
16
src/components/common/StaticImage/StaticImage.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import s from './StaticImage.module.scss'
|
||||
import Image from 'next/image'
|
||||
|
||||
export interface Props {
|
||||
src: StaticImageData,
|
||||
alt?: string,
|
||||
}
|
||||
|
||||
const StaticImage = ({ src, alt }: Props) => {
|
||||
return (
|
||||
<Image src={src} alt={alt} placeholder='blur' className={s.staticImage}/>
|
||||
)
|
||||
}
|
||||
|
||||
export default StaticImage
|
@@ -42,3 +42,6 @@ export { default as DrawerCommon} from './DrawerCommon/DrawerCommon'
|
||||
export { default as CartDrawer} from './CartDrawer/CartDrawer'
|
||||
export { default as TabPane} from './TabCommon/components/TabPane/TabPane'
|
||||
export { default as TabCommon} from './TabCommon/TabCommon'
|
||||
export { default as StaticImage} from './StaticImage/StaticImage'
|
||||
export { default as EmptyCommon} from './EmptyCommon/EmptyCommon'
|
||||
export { default as CustomShapeSvg} from './CustomShapeSvg/CustomShapeSvg'
|
||||
|
43
src/components/contexts/FilterContext.tsx
Normal file
43
src/components/contexts/FilterContext.tsx
Normal file
@@ -0,0 +1,43 @@
|
||||
import { createContext, ReactNode, useContext, useState } from "react";
|
||||
import { filterContextType } from "src/utils/types.utils";
|
||||
|
||||
const contextDefaultValues: filterContextType = {
|
||||
visible: false,
|
||||
open: () => {},
|
||||
close: () => {},
|
||||
};
|
||||
|
||||
const FilterContext = createContext<filterContextType>(contextDefaultValues);
|
||||
|
||||
export function useAuth() {
|
||||
return useContext(FilterContext);
|
||||
}
|
||||
|
||||
type FilterProviderProps = {
|
||||
children: ReactNode;
|
||||
};
|
||||
|
||||
export function FilterProvider({ children }: FilterProviderProps) {
|
||||
const [visible, setVisible] = useState<boolean>(false);
|
||||
|
||||
const open = () => {
|
||||
setVisible(true);
|
||||
};
|
||||
|
||||
const close = () => {
|
||||
setVisible(false);
|
||||
};
|
||||
|
||||
const value = {
|
||||
visible,
|
||||
open,
|
||||
close,
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<FilterContext.Provider value={value}>
|
||||
{children}
|
||||
</FilterContext.Provider>
|
||||
</>
|
||||
);
|
||||
}
|
22
src/components/icons/IconFilter.tsx
Normal file
22
src/components/icons/IconFilter.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import React from 'react'
|
||||
|
||||
interface Props {}
|
||||
|
||||
const IconFilter = (props: Props) => {
|
||||
return (
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 20 20"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M17 0H3C2.20435 0 1.44129 0.316071 0.87868 0.87868C0.316071 1.44129 1.80878e-07 2.20435 1.80878e-07 3V4.17C-0.000143207 4.58294 0.0849664 4.99147 0.25 5.37V5.43C0.39128 5.75097 0.591392 6.04266 0.84 6.29L7 12.41V19C6.99966 19.1699 7.04264 19.3372 7.12487 19.4859C7.20711 19.6346 7.32589 19.7599 7.47 19.85C7.62914 19.9486 7.81277 20.0006 8 20C8.15654 19.9991 8.31068 19.9614 8.45 19.89L12.45 17.89C12.6149 17.8069 12.7536 17.6798 12.8507 17.5227C12.9478 17.3656 12.9994 17.1847 13 17V12.41L19.12 6.29C19.3686 6.04266 19.5687 5.75097 19.71 5.43V5.37C19.8888 4.99443 19.9876 4.58578 20 4.17V3C20 2.20435 19.6839 1.44129 19.1213 0.87868C18.5587 0.316071 17.7956 0 17 0ZM11.29 11.29C11.1973 11.3834 11.124 11.4943 11.0742 11.6161C11.0245 11.7379 10.9992 11.8684 11 12V16.38L9 17.38V12C9.00076 11.8684 8.97554 11.7379 8.92577 11.6161C8.87601 11.4943 8.80268 11.3834 8.71 11.29L3.41 6H16.59L11.29 11.29ZM18 4H2V3C2 2.73478 2.10536 2.48043 2.29289 2.29289C2.48043 2.10536 2.73478 2 3 2H17C17.2652 2 17.5196 2.10536 17.7071 2.29289C17.8946 2.48043 18 2.73478 18 3V4Z"
|
||||
fill="#141414"
|
||||
/>
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
|
||||
export default IconFilter
|
@@ -32,3 +32,4 @@ export { default as IconPlus } from './IconPlus'
|
||||
export { default as IconMinus } from './IconMinus'
|
||||
export { default as IconCirclePlus } from './IconCirclePlus'
|
||||
export { default as IconDoneCheckout } from './IconDoneCheckout'
|
||||
export { default as IconFilter } from './IconFilter'
|
||||
|
@@ -55,7 +55,7 @@ const BlogContent = ({}:BlogContentProps) => {
|
||||
You can eat broccoli stems. In fact, they are delicious. Just use a peeler to peel off the outsides and then trim the stalks into small 1/4”-1/2” cubes.
|
||||
</p>
|
||||
<br/>
|
||||
<img src="https://i.pinimg.com/236x/f0/bd/a6/f0bda6a9ed04a6c4ac9453be80c95f75.jpg" alt="blog-detail" />
|
||||
<img src="https://cdn.pastaxi-manager.onepas.vn/content/uploads/articles/An-%C4%91%E1%BA%B7c%20s%E1%BA%A3n%20v%C3%B9ng%20mi%E1%BB%81n/An-2-21%20%C4%91%E1%BA%B7c%20s%E1%BA%A3n%20SG%20ngon%20n%E1%BB%95i%20ti%E1%BA%BFng/tong-hop-21-dac-san-sai-gon-ngon-noi-tieng-khong-an-that-co-loi-2.jpg" alt="blog-detail" />
|
||||
|
||||
</section>
|
||||
|
||||
|
@@ -0,0 +1,8 @@
|
||||
@import "../../../../styles/_utilities";
|
||||
|
||||
.productListBanner{
|
||||
@apply spacing-horizontal;
|
||||
@screen md {
|
||||
padding:0 3.2rem;
|
||||
}
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
import React from 'react'
|
||||
import { Banner } from 'src/components/common'
|
||||
import BannerRight from './assets/bannerrecipes.png'
|
||||
import s from './ProductListBanner.module.scss'
|
||||
|
||||
interface Props {
|
||||
}
|
||||
|
||||
const ProductListBanner = ({ }: Props) => {
|
||||
return (
|
||||
<div className={s.productListBanner}>
|
||||
<Banner
|
||||
data={
|
||||
[{
|
||||
title: "Save 15% on your first order",
|
||||
subtitle: "Last call! Shop deep deals on 100+ bulk picks while you can.",
|
||||
imgLink: BannerRight.src,
|
||||
size: "large",
|
||||
},
|
||||
]
|
||||
}
|
||||
/>
|
||||
</div >
|
||||
)
|
||||
}
|
||||
|
||||
export default ProductListBanner
|
Binary file not shown.
After Width: | Height: | Size: 780 KiB |
@@ -0,0 +1,88 @@
|
||||
@import "../../../../styles/_utilities";
|
||||
|
||||
.warpper {
|
||||
@apply spacing-horizontal;
|
||||
@screen md{
|
||||
padding:0 3.2rem;
|
||||
padding-bottom:5.6rem;
|
||||
}
|
||||
.breadcrumb{
|
||||
padding:1rem 0;
|
||||
}
|
||||
.main{
|
||||
@screen md {
|
||||
@apply flex;
|
||||
}
|
||||
.categories{
|
||||
@apply hidden;
|
||||
@screen md {
|
||||
@apply hidden;
|
||||
}
|
||||
@screen xl{
|
||||
@apply block;
|
||||
width:25%;
|
||||
}
|
||||
}
|
||||
.list{
|
||||
@screen md {
|
||||
@apply flex justify-between flex-wrap w-full;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
@screen xl {
|
||||
width:75%;
|
||||
}
|
||||
.inner{
|
||||
@screen md {
|
||||
@apply flex flex-col items-center justify-center;
|
||||
}
|
||||
.boxItem {
|
||||
@screen md {
|
||||
@apply flex justify-between flex-wrap;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
.item {
|
||||
@screen md {
|
||||
width: calc(97% / 2);
|
||||
margin-top:1rem;
|
||||
}
|
||||
@screen lg{
|
||||
width: calc(97% / 3);
|
||||
margin-top:1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.boxSelect{
|
||||
@apply w-auto;
|
||||
// padding: 2.5rem 0;
|
||||
display: none;
|
||||
|
||||
@screen xl {
|
||||
@apply block;
|
||||
width: auto;
|
||||
padding:0;
|
||||
}
|
||||
.categorySelectCate{
|
||||
@screen xl {
|
||||
@apply hidden;
|
||||
}
|
||||
}
|
||||
label{
|
||||
@apply font-bold topline ;
|
||||
color:var(--text-active);
|
||||
@screen xl {
|
||||
@apply hidden;
|
||||
}
|
||||
}
|
||||
.select{
|
||||
margin-top: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,66 @@
|
||||
import React from 'react'
|
||||
import { HeadingCommon, ProductList, SelectCommon } from 'src/components/common'
|
||||
import BreadcrumbCommon from 'src/components/common/BreadcrumbCommon/BreadcrumbCommon'
|
||||
import MenuNavigation from 'src/components/common/MenuNavigation/MenuNavigation'
|
||||
import { BRAND, CATEGORY, FEATURED} from 'src/utils/constanst.utils'
|
||||
import { PRODUCT_DATA_TEST_PAGE } from 'src/utils/demo-data'
|
||||
import s from './ProductListFilter.module.scss'
|
||||
|
||||
interface ProductListFilterProps {}
|
||||
|
||||
const BREADCRUMB = [
|
||||
{
|
||||
name: 'Products',
|
||||
link: `#`,
|
||||
},
|
||||
]
|
||||
const OPTIONSLECT = [
|
||||
{
|
||||
name: 'Most Viewed',
|
||||
value: 'most-viewed',
|
||||
},
|
||||
{
|
||||
name: 'Lastest Products',
|
||||
value: 'lastest-products',
|
||||
},
|
||||
{
|
||||
name: 'Recent Products',
|
||||
value: 'recent-products',
|
||||
},
|
||||
]
|
||||
|
||||
const onModalClose = () => {
|
||||
|
||||
}
|
||||
|
||||
const ProductListFilter = (props: ProductListFilterProps) => {
|
||||
return (
|
||||
<div className={s.warpper}>
|
||||
<div className={s.breadcrumb}>
|
||||
<BreadcrumbCommon crumbs={BREADCRUMB} />
|
||||
</div>
|
||||
<div className={s.main}>
|
||||
<div className={s.categories}>
|
||||
<MenuNavigation categories={CATEGORY} heading="Categories" />
|
||||
<MenuNavigation categories={BRAND} heading="Brands" />
|
||||
<MenuNavigation categories={FEATURED} heading="featured" />
|
||||
</div>
|
||||
|
||||
<div className={s.list}>
|
||||
<HeadingCommon align="left">SPECIAL RECIPES</HeadingCommon>
|
||||
|
||||
<div className={s.boxSelect}>
|
||||
<div className={s.categorySelectSort}>
|
||||
<div className={s.select}>
|
||||
<SelectCommon option={OPTIONSLECT} placeholder="Sort By" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ProductList data={PRODUCT_DATA_TEST_PAGE} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default ProductListFilter
|
@@ -1,42 +1,53 @@
|
||||
import React from 'react';
|
||||
import { SelectCommon } from 'src/components/common';
|
||||
import BreadcrumbCommon from 'src/components/common/BreadcrumbCommon/BreadcrumbCommon';
|
||||
import MenuNavigation from 'src/components/common/MenuNavigation/MenuNavigation';
|
||||
import PaginationCommon from 'src/components/common/PaginationCommon/PaginationCommon';
|
||||
import { RecipeCardProps } from 'src/components/common/RecipeCard/RecipeCard';
|
||||
import image12 from "../../../../../public/assets/images/image12.png";
|
||||
import image13 from "../../../../../public/assets/images/image13.png";
|
||||
import image14 from "../../../../../public/assets/images/image14.png";
|
||||
import RecipesItem from './RecipesItem/RecipesItem';
|
||||
import HeadingCommon from "../../../common/HeadingCommon/HeadingCommon";
|
||||
import s from './RecipesList.module.scss';
|
||||
import { OPTION_ALL, QUERY_KEY, ROUTE } from 'src/utils/constanst.utils';
|
||||
import { SelectCommon } from 'src/components/common';
|
||||
import HeadingCommon from "../../../common/HeadingCommon/HeadingCommon";
|
||||
import RecipesItem from './RecipesItem/RecipesItem';
|
||||
import s from './RecipesList.module.scss';
|
||||
|
||||
const recipe:RecipeCardProps[] = [{
|
||||
const recipe: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: image12.src
|
||||
},{
|
||||
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',
|
||||
slug: "special-recipe-of-vietnamese-pho"
|
||||
},
|
||||
{
|
||||
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: image13.src
|
||||
},{
|
||||
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',
|
||||
slug:"original-recipe-of-curry"
|
||||
},
|
||||
{
|
||||
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: image14.src
|
||||
},{
|
||||
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',
|
||||
slug:"the-best-recipe-of-beef-noodle-soup"
|
||||
},
|
||||
{
|
||||
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: image12.src
|
||||
},{
|
||||
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',
|
||||
slug: "special-recipe-of-vietnamese-pho"
|
||||
},
|
||||
{
|
||||
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: image13.src
|
||||
},{
|
||||
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',
|
||||
slug:"original-recipe-of-curry"
|
||||
},
|
||||
{
|
||||
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: image14.src
|
||||
}];
|
||||
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',
|
||||
slug:"the-best-recipe-of-beef-noodle-soup"
|
||||
},];
|
||||
const DEFAULT_PAGESIZE_RECIPELIST = 6;
|
||||
|
||||
const BREADCRUMB = [
|
||||
{
|
||||
name: 'Special Recipes',
|
||||
@@ -203,7 +214,7 @@ const RecipesList = ({ data =recipe}:Props) => {
|
||||
</div>
|
||||
</div>
|
||||
<div className={s.recipesPagination}>
|
||||
<PaginationCommon pageSize={6} total={9}/>
|
||||
<PaginationCommon pageSize={DEFAULT_PAGESIZE_RECIPELIST} total={data?.length}/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@@ -112,6 +112,60 @@
|
||||
border-radius: 60% 2% 2% 2%/ 6% 50% 50% 50%;
|
||||
}
|
||||
|
||||
.shape-common {
|
||||
position: relative;
|
||||
$border: 2px;
|
||||
margin: $border;
|
||||
clip-path: url(#svg-custom-shape);
|
||||
}
|
||||
|
||||
.shape-common-border {
|
||||
position: relative;
|
||||
$border: 2px;
|
||||
margin: $border;
|
||||
|
||||
.inner {
|
||||
background: var(--white);
|
||||
clip-path: url(#svg-custom-shape);
|
||||
}
|
||||
&::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
width: calc(100% + #{$border} * 2);
|
||||
height: calc(100% + #{$border} * 2);
|
||||
background-color: var(--primary);
|
||||
top: calc(#{$border} * -1);
|
||||
left: calc(#{$border} * -1);
|
||||
clip-path: url(#svg-custom-shape);
|
||||
}
|
||||
}
|
||||
|
||||
.shape-common-lg {
|
||||
clip-path: url(#svg-custom-shape-lg);
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.shape-common-lg-border {
|
||||
position: relative;
|
||||
$border: 2px;
|
||||
margin: $border;
|
||||
|
||||
.inner {
|
||||
padding: 2rem;
|
||||
clip-path: url(#svg-custom-shape-lg);
|
||||
}
|
||||
&::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
width: calc(100% + #{$border} * 2);
|
||||
height: calc(100% + #{$border} * 2);
|
||||
background-color: var(--primary);
|
||||
top: calc(#{$border} * -1);
|
||||
left: calc(#{$border} * -1);
|
||||
clip-path: url(#svg-custom-shape-lg);
|
||||
}
|
||||
}
|
||||
|
||||
.font-heading {
|
||||
font-family: var(--font-heading);
|
||||
}
|
||||
@@ -135,7 +189,7 @@
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
background-color: var(--primary)
|
||||
background-color: var(--primary);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
export const BLUR_DATA_IMG = 'data:image/png;base64,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'
|
||||
|
||||
export const SOCIAL_LINKS = {
|
||||
FB: 'FB',
|
||||
TWITTER: 'TWITTER',
|
||||
@@ -50,4 +52,67 @@ export const KEY = {
|
||||
}
|
||||
|
||||
export const OPTION_ALL = 'all';
|
||||
export const DEFAULT_PAGE_SIZE=20
|
||||
export const DEFAULT_PAGE_SIZE=20;
|
||||
|
||||
|
||||
export const CATEGORY = [
|
||||
{
|
||||
name: 'All',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.CATEGORY}=${OPTION_ALL}`,
|
||||
},
|
||||
{
|
||||
name: 'Veggie',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.CATEGORY}=veggie`,
|
||||
},
|
||||
{
|
||||
name: 'Seafood',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.CATEGORY}=seafood`,
|
||||
},
|
||||
{
|
||||
name: 'Frozen',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.CATEGORY}=frozen`,
|
||||
},
|
||||
{
|
||||
name: 'Coffee Bean',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.CATEGORY}=coffee_bean`,
|
||||
},
|
||||
{
|
||||
name: 'Sauce',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.CATEGORY}=sauce`,
|
||||
},
|
||||
]
|
||||
|
||||
export const BRAND = [
|
||||
{
|
||||
name: 'Maggi',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.BRAND}=maggi`,
|
||||
},
|
||||
{
|
||||
name: 'Chomilex',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.BRAND}=chomilex`,
|
||||
},
|
||||
{
|
||||
name: 'Chinsu',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.BRAND}=chinsu`,
|
||||
},
|
||||
]
|
||||
|
||||
export const FEATURED = [
|
||||
{
|
||||
name: 'Best Sellers',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.FEATURED}=best_sellers`,
|
||||
},
|
||||
{
|
||||
name: 'Sales',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.FEATURED}=sales`,
|
||||
},
|
||||
{
|
||||
name: 'New Item',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.FEATURED}=new_item`,
|
||||
},
|
||||
{
|
||||
name: 'Viewed',
|
||||
link: `${ROUTE.PRODUCTS}/?${QUERY_KEY.FEATURED}=viewed`,
|
||||
},
|
||||
]
|
||||
|
||||
|
@@ -250,3 +250,4 @@ export const CHECKOUT_BILL_DATA:CardItemCheckoutProps[] = [
|
||||
quantity:2
|
||||
},
|
||||
]
|
||||
export const PRODUCT_DATA_TEST_PAGE = [...PRODUCT_DATA_TEST, ...PRODUCT_DATA_TEST, ...PRODUCT_DATA_TEST, ...PRODUCT_DATA_TEST, ...PRODUCT_DATA_TEST]
|
@@ -44,5 +44,10 @@ export interface CheckOutForm {
|
||||
shipping_fee?:number
|
||||
}
|
||||
|
||||
|
||||
export type MouseAndTouchEvent = MouseEvent | TouchEvent
|
||||
|
||||
export type filterContextType = {
|
||||
visible: boolean;
|
||||
open: () => void;
|
||||
close: () => void;
|
||||
};
|
Reference in New Issue
Block a user