Change links

This commit is contained in:
Catalin Pinte 2022-11-01 10:35:36 +02:00
parent c75b0fc001
commit f4abd321c8
16 changed files with 360 additions and 172 deletions

View File

@ -11,7 +11,7 @@ export const getSearchVariables = ({
let query = '' let query = ''
if (search) { if (search) {
query += `product_type:"${search}" OR title:"${search}" OR tag:"${search}" ` query += `(product_type:${search}) OR (title:${search}) OR (tag:${search}) `
} }
if (brandId) { if (brandId) {

217
pnpm-lock.yaml generated
View File

@ -626,7 +626,7 @@ importers:
lint-staged: ^13.0.3 lint-staged: ^13.0.3
lodash.random: ^3.2.0 lodash.random: ^3.2.0
lodash.throttle: ^4.1.1 lodash.throttle: ^4.1.1
next: ^12.3.0 next: ^13.0.0
next-themes: ^0.2.0 next-themes: ^0.2.0
postcss: ^8.3.5 postcss: ^8.3.5
postcss-flexbugs-fixes: ^5.0.2 postcss-flexbugs-fixes: ^5.0.2
@ -664,8 +664,8 @@ importers:
keen-slider: 6.8.0 keen-slider: 6.8.0
lodash.random: 3.2.0 lodash.random: 3.2.0
lodash.throttle: 4.1.1 lodash.throttle: 4.1.1
next: 12.3.0_biqbaboplfbrettd7655fr4n2y next: 13.0.0_biqbaboplfbrettd7655fr4n2y
next-themes: 0.2.1_c3hne4hwj64hb7tofigd3bvkji next-themes: 0.2.1_r5sq4deac3rmm2d5onhwvomqve
postcss: 8.4.16 postcss: 8.4.16
postcss-nesting: 10.1.10_postcss@8.4.16 postcss-nesting: 10.1.10_postcss@8.4.16
react: 18.2.0 react: 18.2.0
@ -2286,6 +2286,11 @@ packages:
/@next/env/12.3.0: /@next/env/12.3.0:
resolution: {integrity: sha512-PTJpjAFVbzBQ9xXpzMTroShvD5YDIIy46jQ7d4LrWpY+/5a8H90Tm8hE3Hvkc5RBRspVo7kvEOnqQms0A+2Q6w==} resolution: {integrity: sha512-PTJpjAFVbzBQ9xXpzMTroShvD5YDIIy46jQ7d4LrWpY+/5a8H90Tm8hE3Hvkc5RBRspVo7kvEOnqQms0A+2Q6w==}
dev: true
/@next/env/13.0.0:
resolution: {integrity: sha512-65v9BVuah2Mplohm4+efsKEnoEuhmlGm8B2w6vD1geeEP2wXtlSJCvR/cCRJ3fD8wzCQBV41VcMBQeYET6MRkg==}
dev: false
/@next/eslint-plugin-next/12.3.0: /@next/eslint-plugin-next/12.3.0:
resolution: {integrity: sha512-jVdq1qYTNDjUtulnE8/hkPv0pHILV4jMg5La99iaY/FFm20WxVnsAZtbNnMvlPbf8dc010oO304SX9yXbg5PAw==} resolution: {integrity: sha512-jVdq1qYTNDjUtulnE8/hkPv0pHILV4jMg5La99iaY/FFm20WxVnsAZtbNnMvlPbf8dc010oO304SX9yXbg5PAw==}
@ -2299,6 +2304,16 @@ packages:
cpu: [arm] cpu: [arm]
os: [android] os: [android]
requiresBuild: true requiresBuild: true
dev: true
optional: true
/@next/swc-android-arm-eabi/13.0.0:
resolution: {integrity: sha512-+DUQkYF93gxFjWY+CYWE1QDX6gTgnUiWf+W4UqZjM1Jcef8U97fS6xYh+i+8rH4MM0AXHm7OSakvfOMzmjU6VA==}
engines: {node: '>= 10'}
cpu: [arm]
os: [android]
requiresBuild: true
dev: false
optional: true optional: true
/@next/swc-android-arm64/12.3.0: /@next/swc-android-arm64/12.3.0:
@ -2307,6 +2322,16 @@ packages:
cpu: [arm64] cpu: [arm64]
os: [android] os: [android]
requiresBuild: true requiresBuild: true
dev: true
optional: true
/@next/swc-android-arm64/13.0.0:
resolution: {integrity: sha512-RW9Uy3bMSc0zVGCa11klFuwfP/jdcdkhdruqnrJ7v+7XHm6OFKkSRzX6ee7yGR1rdDZvTnP4GZSRSpzjLv/N0g==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [android]
requiresBuild: true
dev: false
optional: true optional: true
/@next/swc-darwin-arm64/12.3.0: /@next/swc-darwin-arm64/12.3.0:
@ -2315,6 +2340,16 @@ packages:
cpu: [arm64] cpu: [arm64]
os: [darwin] os: [darwin]
requiresBuild: true requiresBuild: true
dev: true
optional: true
/@next/swc-darwin-arm64/13.0.0:
resolution: {integrity: sha512-APA26nps1j4qyhOIzkclW/OmgotVHj1jBxebSpMCPw2rXfiNvKNY9FA0TcuwPmUCNqaTnm703h6oW4dvp73A4Q==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: false
optional: true optional: true
/@next/swc-darwin-x64/12.3.0: /@next/swc-darwin-x64/12.3.0:
@ -2323,6 +2358,16 @@ packages:
cpu: [x64] cpu: [x64]
os: [darwin] os: [darwin]
requiresBuild: true requiresBuild: true
dev: true
optional: true
/@next/swc-darwin-x64/13.0.0:
resolution: {integrity: sha512-qsUhUdoFuRJiaJ7LnvTQ6GZv1QnMDcRXCIjxaN0FNVXwrjkq++U7KjBUaxXkRzLV4C7u0NHLNOp0iZwNNE7ypw==}
engines: {node: '>= 10'}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: false
optional: true optional: true
/@next/swc-freebsd-x64/12.3.0: /@next/swc-freebsd-x64/12.3.0:
@ -2331,6 +2376,16 @@ packages:
cpu: [x64] cpu: [x64]
os: [freebsd] os: [freebsd]
requiresBuild: true requiresBuild: true
dev: true
optional: true
/@next/swc-freebsd-x64/13.0.0:
resolution: {integrity: sha512-sCdyCbboS7CwdnevKH9J6hkJI76LUw1jVWt4eV7kISuLiPba3JmehZSWm80oa4ADChRVAwzhLAo2zJaYRrInbg==}
engines: {node: '>= 10'}
cpu: [x64]
os: [freebsd]
requiresBuild: true
dev: false
optional: true optional: true
/@next/swc-linux-arm-gnueabihf/12.3.0: /@next/swc-linux-arm-gnueabihf/12.3.0:
@ -2339,6 +2394,16 @@ packages:
cpu: [arm] cpu: [arm]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true
optional: true
/@next/swc-linux-arm-gnueabihf/13.0.0:
resolution: {integrity: sha512-/X/VxfFA41C9jrEv+sUsPLQ5vbDPVIgG0CJrzKvrcc+b+4zIgPgtfsaWq9ockjHFQi3ycvlZK4TALOXO8ovQ6Q==}
engines: {node: '>= 10'}
cpu: [arm]
os: [linux]
requiresBuild: true
dev: false
optional: true optional: true
/@next/swc-linux-arm64-gnu/12.3.0: /@next/swc-linux-arm64-gnu/12.3.0:
@ -2347,6 +2412,16 @@ packages:
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true
optional: true
/@next/swc-linux-arm64-gnu/13.0.0:
resolution: {integrity: sha512-x6Oxr1GIi0ZtNiT6jbw+JVcbEi3UQgF7mMmkrgfL4mfchOwXtWSHKTSSPnwoJWJfXYa0Vy1n8NElWNTGAqoWFw==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: false
optional: true optional: true
/@next/swc-linux-arm64-musl/12.3.0: /@next/swc-linux-arm64-musl/12.3.0:
@ -2355,6 +2430,16 @@ packages:
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true
optional: true
/@next/swc-linux-arm64-musl/13.0.0:
resolution: {integrity: sha512-SnMH9ngI+ipGh3kqQ8+mDtWunirwmhQnQeZkEq9e/9Xsgjf04OetqrqRHKM1HmJtG2qMUJbyXFJ0F81TPuT+3g==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: false
optional: true optional: true
/@next/swc-linux-x64-gnu/12.3.0: /@next/swc-linux-x64-gnu/12.3.0:
@ -2363,6 +2448,16 @@ packages:
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true
optional: true
/@next/swc-linux-x64-gnu/13.0.0:
resolution: {integrity: sha512-VSQwTX9EmdbotArtA1J67X8964oQfe0xHb32x4tu+JqTR+wOHyG6wGzPMdXH2oKAp6rdd7BzqxUXXf0J+ypHlw==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: false
optional: true optional: true
/@next/swc-linux-x64-musl/12.3.0: /@next/swc-linux-x64-musl/12.3.0:
@ -2371,6 +2466,16 @@ packages:
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true
optional: true
/@next/swc-linux-x64-musl/13.0.0:
resolution: {integrity: sha512-xBCP0nnpO0q4tsytXkvIwWFINtbFRyVY5gxa1zB0vlFtqYR9lNhrOwH3CBrks3kkeaePOXd611+8sjdUtrLnXA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: false
optional: true optional: true
/@next/swc-win32-arm64-msvc/12.3.0: /@next/swc-win32-arm64-msvc/12.3.0:
@ -2379,6 +2484,16 @@ packages:
cpu: [arm64] cpu: [arm64]
os: [win32] os: [win32]
requiresBuild: true requiresBuild: true
dev: true
optional: true
/@next/swc-win32-arm64-msvc/13.0.0:
resolution: {integrity: sha512-NutwDafqhGxqPj/eiUixJq9ImS/0sgx6gqlD7jRndCvQ2Q8AvDdu1+xKcGWGNnhcDsNM/n1avf1e62OG1GaqJg==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: false
optional: true optional: true
/@next/swc-win32-ia32-msvc/12.3.0: /@next/swc-win32-ia32-msvc/12.3.0:
@ -2387,6 +2502,16 @@ packages:
cpu: [ia32] cpu: [ia32]
os: [win32] os: [win32]
requiresBuild: true requiresBuild: true
dev: true
optional: true
/@next/swc-win32-ia32-msvc/13.0.0:
resolution: {integrity: sha512-zNaxaO+Kl/xNz02E9QlcVz0pT4MjkXGDLb25qxtAzyJL15aU0+VjjbIZAYWctG59dvggNIUNDWgoBeVTKB9xLg==}
engines: {node: '>= 10'}
cpu: [ia32]
os: [win32]
requiresBuild: true
dev: false
optional: true optional: true
/@next/swc-win32-x64-msvc/12.3.0: /@next/swc-win32-x64-msvc/12.3.0:
@ -2395,6 +2520,16 @@ packages:
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
requiresBuild: true requiresBuild: true
dev: true
optional: true
/@next/swc-win32-x64-msvc/13.0.0:
resolution: {integrity: sha512-FFOGGWwTCRMu9W7MF496Urefxtuo2lttxF1vwS+1rIRsKvuLrWhVaVTj3T8sf2EBL6gtJbmh4TYlizS+obnGKA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: false
optional: true optional: true
/@nodelib/fs.scandir/2.1.5: /@nodelib/fs.scandir/2.1.5:
@ -3918,6 +4053,10 @@ packages:
/caniuse-lite/1.0.30001399: /caniuse-lite/1.0.30001399:
resolution: {integrity: sha512-4vQ90tMKS+FkvuVWS5/QY1+d805ODxZiKFzsU8o/RsVJz49ZSRR8EjykLJbqhzdPgadbX6wB538wOzle3JniRA==} resolution: {integrity: sha512-4vQ90tMKS+FkvuVWS5/QY1+d805ODxZiKFzsU8o/RsVJz49ZSRR8EjykLJbqhzdPgadbX6wB538wOzle3JniRA==}
/caniuse-lite/1.0.30001422:
resolution: {integrity: sha512-hSesn02u1QacQHhaxl/kNMZwqVG35Sz/8DgvmgedxSH8z9UUpcDYSPYgsj3x5dQNRcNp6BwpSfQfVzYUTm+fog==}
dev: false
/capital-case/1.0.4: /capital-case/1.0.4:
resolution: {integrity: sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==} resolution: {integrity: sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==}
dependencies: dependencies:
@ -4089,6 +4228,10 @@ packages:
engines: {node: '>= 10'} engines: {node: '>= 10'}
dev: true dev: true
/client-only/0.0.1:
resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==}
dev: false
/cliui/6.0.0: /cliui/6.0.0:
resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==}
dependencies: dependencies:
@ -7065,14 +7208,14 @@ packages:
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
dev: true dev: true
/next-themes/0.2.1_c3hne4hwj64hb7tofigd3bvkji: /next-themes/0.2.1_r5sq4deac3rmm2d5onhwvomqve:
resolution: {integrity: sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A==} resolution: {integrity: sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A==}
peerDependencies: peerDependencies:
next: '*' next: '*'
react: '*' react: '*'
react-dom: '*' react-dom: '*'
dependencies: dependencies:
next: 12.3.0_biqbaboplfbrettd7655fr4n2y next: 13.0.0_biqbaboplfbrettd7655fr4n2y
react: 18.2.0 react: 18.2.0
react-dom: 18.2.0_react@18.2.0 react-dom: 18.2.0_react@18.2.0
dev: false dev: false
@ -7120,6 +7263,52 @@ packages:
transitivePeerDependencies: transitivePeerDependencies:
- '@babel/core' - '@babel/core'
- babel-plugin-macros - babel-plugin-macros
dev: true
/next/13.0.0_biqbaboplfbrettd7655fr4n2y:
resolution: {integrity: sha512-puH1WGM6rGeFOoFdXXYfUxN9Sgi4LMytCV5HkQJvVUOhHfC1DoVqOfvzaEteyp6P04IW+gbtK2Q9pInVSrltPA==}
engines: {node: '>=14.6.0'}
hasBin: true
peerDependencies:
fibers: '>= 3.1.0'
node-sass: ^6.0.0 || ^7.0.0
react: ^18.0.0-0
react-dom: ^18.0.0-0
sass: ^1.3.0
peerDependenciesMeta:
fibers:
optional: true
node-sass:
optional: true
sass:
optional: true
dependencies:
'@next/env': 13.0.0
'@swc/helpers': 0.4.11
caniuse-lite: 1.0.30001422
postcss: 8.4.14
react: 18.2.0
react-dom: 18.2.0_react@18.2.0
styled-jsx: 5.1.0_react@18.2.0
use-sync-external-store: 1.2.0_react@18.2.0
optionalDependencies:
'@next/swc-android-arm-eabi': 13.0.0
'@next/swc-android-arm64': 13.0.0
'@next/swc-darwin-arm64': 13.0.0
'@next/swc-darwin-x64': 13.0.0
'@next/swc-freebsd-x64': 13.0.0
'@next/swc-linux-arm-gnueabihf': 13.0.0
'@next/swc-linux-arm64-gnu': 13.0.0
'@next/swc-linux-arm64-musl': 13.0.0
'@next/swc-linux-x64-gnu': 13.0.0
'@next/swc-linux-x64-musl': 13.0.0
'@next/swc-win32-arm64-msvc': 13.0.0
'@next/swc-win32-ia32-msvc': 13.0.0
'@next/swc-win32-x64-msvc': 13.0.0
transitivePeerDependencies:
- '@babel/core'
- babel-plugin-macros
dev: false
/no-case/3.0.4: /no-case/3.0.4:
resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==}
@ -8863,6 +9052,24 @@ packages:
optional: true optional: true
dependencies: dependencies:
react: 18.2.0 react: 18.2.0
dev: true
/styled-jsx/5.1.0_react@18.2.0:
resolution: {integrity: sha512-/iHaRJt9U7T+5tp6TRelLnqBqiaIT0HsO0+vgyj8hK2KUk7aejFqRrumqPUlAqDwAj8IbS/1hk3IhBAAK/FCUQ==}
engines: {node: '>= 12.0.0'}
peerDependencies:
'@babel/core': '*'
babel-plugin-macros: '*'
react: '>= 16.8.0 || 17.x.x || ^18.0.0-0'
peerDependenciesMeta:
'@babel/core':
optional: true
babel-plugin-macros:
optional: true
dependencies:
client-only: 0.0.1
react: 18.2.0
dev: false
/supports-color/2.0.0: /supports-color/2.0.0:
resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==}

View File

@ -86,29 +86,25 @@ const CartItem = ({
<div className="flex flex-row space-x-4 py-4"> <div className="flex flex-row space-x-4 py-4">
<div className="w-16 h-16 bg-violet relative overflow-hidden cursor-pointer z-0"> <div className="w-16 h-16 bg-violet relative overflow-hidden cursor-pointer z-0">
<Link href={`/product/${item.path}`}> <Link href={`/product/${item.path}`}>
<a> <Image
<Image onClick={() => closeSidebarIfPresent()}
onClick={() => closeSidebarIfPresent()} className={s.productImage}
className={s.productImage} width={150}
width={150} height={150}
height={150} src={item.variant.image?.url || placeholderImg}
src={item.variant.image?.url || placeholderImg} alt={item.variant.image?.alt || 'Product Image'}
alt={item.variant.image?.alt || 'Product Image'} unoptimized
unoptimized />
/>
</a>
</Link> </Link>
</div> </div>
<div className="flex-1 flex flex-col text-base"> <div className="flex-1 flex flex-col text-base">
<Link href={`/product/${item.path}`}> <Link href={`/product/${item.path}`}>
<a> <span
<span className={s.productName}
className={s.productName} onClick={() => closeSidebarIfPresent()}
onClick={() => closeSidebarIfPresent()} >
> {item.name}
{item.name} </span>
</span>
</a>
</Link> </Link>
{options && options.length > 0 && ( {options && options.length > 0 && (
<div className="flex items-center pb-1"> <div className="flex items-center pb-1">

View File

@ -74,11 +74,9 @@ const CartSidebarView: FC = () => {
<> <>
<div className="px-4 sm:px-6 flex-1"> <div className="px-4 sm:px-6 flex-1">
<Link href="/cart"> <Link href="/cart">
<a> <Text variant="sectionHeading" onClick={handleClose}>
<Text variant="sectionHeading" onClick={handleClose}> My Cart
My Cart </Text>
</Text>
</a>
</Link> </Link>
<ul className={s.lineItemsList}> <ul className={s.lineItemsList}>
{data!.lineItems.map((item: any) => ( {data!.lineItems.map((item: any) => (

View File

@ -55,9 +55,7 @@ const CheckoutSidebarView: FC = () => {
> >
<div className="px-4 sm:px-6 flex-1"> <div className="px-4 sm:px-6 flex-1">
<Link href="/cart"> <Link href="/cart">
<a> <Text variant="sectionHeading">Checkout</Text>
<Text variant="sectionHeading">Checkout</Text>
</a>
</Link> </Link>
<PaymentWidget <PaymentWidget

View File

@ -31,23 +31,25 @@ const Footer: FC<Props> = ({ className, pages }) => {
<Container> <Container>
<div className="grid grid-cols-1 lg:grid-cols-12 gap-8 border-b border-accent-2 py-12 text-primary bg-primary transition-colors duration-150"> <div className="grid grid-cols-1 lg:grid-cols-12 gap-8 border-b border-accent-2 py-12 text-primary bg-primary transition-colors duration-150">
<div className="col-span-1 lg:col-span-2"> <div className="col-span-1 lg:col-span-2">
<Link href="/"> <Link
<a className="flex flex-initial items-center font-bold md:mr-24"> href="/"
<span className="rounded-full border border-accent-6 mr-2"> className="flex flex-initial items-center font-bold md:mr-24"
<Logo /> >
</span> <span className="rounded-full border border-accent-6 mr-2">
<span>ACME</span> <Logo />
</a> </span>
<span>ACME</span>
</Link> </Link>
</div> </div>
<div className="col-span-1 lg:col-span-8"> <div className="col-span-1 lg:col-span-8">
<div className="grid md:grid-rows-4 md:grid-cols-3 md:grid-flow-col"> <div className="grid md:grid-rows-4 md:grid-cols-3 md:grid-flow-col">
{[...links, ...sitePages].map((page) => ( {[...links, ...sitePages].map((page) => (
<span key={page.url} className="py-3 md:py-0 md:pb-4"> <span key={page.url} className="py-3 md:py-0 md:pb-4">
<Link href={page.url!}> <Link
<a className="text-accent-9 hover:text-accent-6 transition ease-in-out duration-150"> href={page.url!}
{page.name} className="text-accent-9 hover:text-accent-6 transition ease-in-out duration-150"
</a> >
{page.name}
</Link> </Link>
</span> </span>
))} ))}

View File

@ -24,29 +24,21 @@ const HomeAllProductsGrid: FC<Props> = ({
<div className={s.aside}> <div className={s.aside}>
<ul className="mb-10"> <ul className="mb-10">
<li className="py-1 text-base font-bold tracking-wide"> <li className="py-1 text-base font-bold tracking-wide">
<Link href={getCategoryPath('')}> <Link href={getCategoryPath('')}>All Categories</Link>
<a>All Categories</a>
</Link>
</li> </li>
{categories?.map((cat: any) => ( {categories?.map((cat: any) => (
<li key={cat.path} className="py-1 text-accent-8 text-base"> <li key={cat.path} className="py-1 text-accent-8 text-base">
<Link href={getCategoryPath(cat.path)}> <Link href={getCategoryPath(cat.path)}>{cat.name}</Link>
<a>{cat.name}</a>
</Link>
</li> </li>
))} ))}
</ul> </ul>
<ul className=""> <ul className="">
<li className="py-1 text-base font-bold tracking-wide"> <li className="py-1 text-base font-bold tracking-wide">
<Link href={getDesignerPath('')}> <Link href={getDesignerPath('')}>All Designers</Link>
<a>All Designers</a>
</Link>
</li> </li>
{brands?.map(({ path, name }) => ( {brands?.map(({ path, name }) => (
<li key={path} className="py-1 text-accent-8 text-base"> <li key={path} className="py-1 text-accent-8 text-base">
<Link href={getDesignerPath(path)}> <Link href={getDesignerPath(path)}>{name}</Link>
<a>{name}</a>
</Link>
</li> </li>
))} ))}
</ul> </ul>

View File

@ -81,13 +81,13 @@ const I18nWidget: FC = () => {
<ul> <ul>
{options.map((locale) => ( {options.map((locale) => (
<li key={locale}> <li key={locale}>
<Link href={currentPath} locale={locale}> <Link
<a href={currentPath}
className={cn(s.item)} locale={locale}
onClick={() => setDisplay(false)} className={cn(s.item)}
> onClick={() => setDisplay(false)}
{LOCALES_MAP[locale].name} >
</a> {LOCALES_MAP[locale].name}
</Link> </Link>
</li> </li>
))} ))}

View File

@ -19,18 +19,16 @@ const Navbar: FC<NavbarProps> = ({ links }) => (
<Container clean className="mx-auto max-w-8xl px-6"> <Container clean className="mx-auto max-w-8xl px-6">
<div className={s.nav}> <div className={s.nav}>
<div className="flex items-center flex-1"> <div className="flex items-center flex-1">
<Link href="/"> <Link href="/" className={s.logo} aria-label="Logo">
<a className={s.logo} aria-label="Logo"> <Logo />
<Logo />
</a>
</Link> </Link>
<nav className={s.navMenu}> <nav className={s.navMenu}>
<Link href="/search"> <Link href="/search" className={s.link}>
<a className={s.link}>All</a> All
</Link> </Link>
{links?.map((l) => ( {links?.map((l) => (
<Link href={l.href} key={l.href}> <Link href={l.href} key={l.href} className={s.link}>
<a className={s.link}>{l.label}</a> {l.label}
</Link> </Link>
))} ))}
</nav> </nav>

View File

@ -17,9 +17,7 @@ export default function MenuSidebarView({
<nav> <nav>
<ul> <ul>
<li className={s.item} onClick={() => closeSidebar()}> <li className={s.item} onClick={() => closeSidebar()}>
<Link href="/search"> <Link href="/search">All</Link>
<a>All</a>
</Link>
</li> </li>
{links.map((l: any) => ( {links.map((l: any) => (
<li <li
@ -27,9 +25,7 @@ export default function MenuSidebarView({
className={s.item} className={s.item}
onClick={() => closeSidebar()} onClick={() => closeSidebar()}
> >
<Link href={l.href}> <Link href={l.href}>{l.label}</Link>
<a>{l.label}</a>
</Link>
</li> </li>
))} ))}
</ul> </ul>

View File

@ -38,99 +38,101 @@ const ProductCard: FC<Props> = ({
) )
return ( return (
<Link href={`/product/${product.slug}`}> <Link
<a className={rootClassName} aria-label={product.name}> href={`/product/${product.slug}`}
{variant === 'slim' && ( className={rootClassName}
<> aria-label={product.name}
<div className={s.header}> >
<span>{product.name}</span> {variant === 'slim' && (
<>
<div className={s.header}>
<span>{product.name}</span>
</div>
{product?.images && (
<div>
<Image
quality="85"
src={product.images[0]?.url || placeholderImg}
alt={product.name || 'Product Image'}
height={320}
width={320}
layout="fixed"
{...imgProps}
/>
</div> </div>
)}
</>
)}
{variant === 'simple' && (
<>
{process.env.COMMERCE_WISHLIST_ENABLED && (
<WishlistButton
className={s.wishlistButton}
productId={product.id}
variant={product.variants[0]}
/>
)}
{!noNameTag && (
<div className={s.header}>
<h3 className={s.name}>
<span>{product.name}</span>
</h3>
<div className={s.price}>
{`${price} ${product.price?.currencyCode}`}
</div>
</div>
)}
<div className={s.imageContainer}>
{product?.images && ( {product?.images && (
<div> <div>
<Image <Image
quality="85"
src={product.images[0]?.url || placeholderImg}
alt={product.name || 'Product Image'} alt={product.name || 'Product Image'}
height={320} className={s.productImage}
width={320} src={product.images[0]?.url || placeholderImg}
layout="fixed" height={540}
width={540}
quality="85"
layout="responsive"
{...imgProps} {...imgProps}
/> />
</div> </div>
)} )}
</> </div>
)} </>
)}
{variant === 'simple' && ( {variant === 'default' && (
<> <>
{process.env.COMMERCE_WISHLIST_ENABLED && ( {process.env.COMMERCE_WISHLIST_ENABLED && (
<WishlistButton <WishlistButton
className={s.wishlistButton} className={s.wishlistButton}
productId={product.id} productId={product.id}
variant={product.variants[0]} variant={product.variants[0] as any}
/> />
)} )}
{!noNameTag && ( <ProductTag
<div className={s.header}> name={product.name}
<h3 className={s.name}> price={`${price} ${product.price?.currencyCode}`}
<span>{product.name}</span> />
</h3> <div className={s.imageContainer}>
<div className={s.price}> {product?.images && (
{`${price} ${product.price?.currencyCode}`} <div>
</div> <Image
alt={product.name || 'Product Image'}
className={s.productImage}
src={product.images[0]?.url || placeholderImg}
height={540}
width={540}
quality="85"
layout="responsive"
{...imgProps}
/>
</div> </div>
)} )}
<div className={s.imageContainer}> </div>
{product?.images && ( </>
<div> )}
<Image
alt={product.name || 'Product Image'}
className={s.productImage}
src={product.images[0]?.url || placeholderImg}
height={540}
width={540}
quality="85"
layout="responsive"
{...imgProps}
/>
</div>
)}
</div>
</>
)}
{variant === 'default' && (
<>
{process.env.COMMERCE_WISHLIST_ENABLED && (
<WishlistButton
className={s.wishlistButton}
productId={product.id}
variant={product.variants[0] as any}
/>
)}
<ProductTag
name={product.name}
price={`${price} ${product.price?.currencyCode}`}
/>
<div className={s.imageContainer}>
{product?.images && (
<div>
<Image
alt={product.name || 'Product Image'}
className={s.productImage}
src={product.images[0]?.url || placeholderImg}
height={540}
width={540}
quality="85"
layout="responsive"
{...imgProps}
/>
</div>
)}
</div>
</>
)}
</a>
</Link> </Link>
) )
} }

View File

@ -17,11 +17,12 @@ const Hero: FC<HeroProps> = ({ headline, description }) => {
<h2 className={s.title}>{headline}</h2> <h2 className={s.title}>{headline}</h2>
<div className={s.description}> <div className={s.description}>
<p>{description}</p> <p>{description}</p>
<Link href="/"> <Link
<a className="flex items-center text-accent-0 pt-3 font-bold hover:underline cursor-pointer w-max-content"> href="/"
Read it here className="flex items-center text-accent-0 pt-3 font-bold hover:underline cursor-pointer w-max-content"
<ArrowRight width="20" heigh="20" className="ml-1" /> >
</a> Read it here
<ArrowRight width="20" heigh="20" className="ml-1" />
</Link> </Link>
</div> </div>
</div> </div>

View File

@ -6,8 +6,8 @@ const Link: React.FC<
} }
> = ({ href, children, ...props }) => { > = ({ href, children, ...props }) => {
return ( return (
<NextLink href={href}> <NextLink href={href} {...props}>
<a {...props}>{children}</a> {children}
</NextLink> </NextLink>
) )
} }

View File

@ -73,9 +73,7 @@ const WishlistCard: React.FC<{
<div className={s.description}> <div className={s.description}>
<div className="flex-1 mb-6"> <div className="flex-1 mb-6">
<h3 className="text-2xl mb-2 -mt-1"> <h3 className="text-2xl mb-2 -mt-1">
<Link href={`/product${product.path}`}> <Link href={`/product${product.path}`}>{product.name}</Link>
<a>{product.name}</a>
</Link>
</h3> </h3>
<div className="mb-4"> <div className="mb-4">
<Text html={product.description} /> <Text html={product.description} />

View File

@ -22,10 +22,10 @@
"@vercel/commerce-local": "workspace:*", "@vercel/commerce-local": "workspace:*",
"@vercel/commerce-ordercloud": "workspace:*", "@vercel/commerce-ordercloud": "workspace:*",
"@vercel/commerce-saleor": "workspace:*", "@vercel/commerce-saleor": "workspace:*",
"@vercel/commerce-sfcc": "workspace:*",
"@vercel/commerce-shopify": "workspace:*", "@vercel/commerce-shopify": "workspace:*",
"@vercel/commerce-spree": "workspace:*", "@vercel/commerce-spree": "workspace:*",
"@vercel/commerce-swell": "workspace:*", "@vercel/commerce-swell": "workspace:*",
"@vercel/commerce-sfcc": "workspace:*",
"@vercel/commerce-vendure": "workspace:*", "@vercel/commerce-vendure": "workspace:*",
"autoprefixer": "^10.4.2", "autoprefixer": "^10.4.2",
"body-scroll-lock": "^4.0.0-beta.0", "body-scroll-lock": "^4.0.0-beta.0",
@ -35,7 +35,7 @@
"keen-slider": "^6.7.0", "keen-slider": "^6.7.0",
"lodash.random": "^3.2.0", "lodash.random": "^3.2.0",
"lodash.throttle": "^4.1.1", "lodash.throttle": "^4.1.1",
"next": "^12.3.0", "next": "^13.0.0",
"next-themes": "^0.2.0", "next-themes": "^0.2.0",
"postcss": "^8.3.5", "postcss": "^8.3.5",
"postcss-nesting": "^10.1.10", "postcss-nesting": "^10.1.10",

View File

@ -23,8 +23,8 @@
"@components/*": ["components/*"], "@components/*": ["components/*"],
"@commerce": ["../packages/commerce/src"], "@commerce": ["../packages/commerce/src"],
"@commerce/*": ["../packages/commerce/src/*"], "@commerce/*": ["../packages/commerce/src/*"],
"@framework": ["../packages/local/src"], "@framework": ["../packages/shopify/src"],
"@framework/*": ["../packages/local/src/*"] "@framework/*": ["../packages/shopify/src/*"]
} }
}, },
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"], "include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],