Update cookies & packages to Next 13

This commit is contained in:
Catalin Pinte 2022-12-08 10:20:09 +02:00
parent 5ca9ebb3cd
commit 0d553fe52f
37 changed files with 579 additions and 206 deletions

View File

@ -58,7 +58,7 @@
"uuidv4": "^6.2.13" "uuidv4": "^6.2.13"
}, },
"peerDependencies": { "peerDependencies": {
"next": "^12", "next": "^13",
"react": "^18", "react": "^18",
"react-dom": "^18" "react-dom": "^18"
}, },
@ -73,7 +73,7 @@
"@types/node-fetch": "^2.6.2", "@types/node-fetch": "^2.6.2",
"@types/react": "^18.0.14", "@types/react": "^18.0.14",
"lint-staged": "^12.1.7", "lint-staged": "^12.1.7",
"next": "^12.0.8", "next": "^13.0.6",
"prettier": "^2.5.1", "prettier": "^2.5.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",

View File

@ -8,8 +8,8 @@ const getCheckout: CheckoutEndpoint['handlers']['getCheckout'] = async ({
config, config,
}) => { }) => {
const { cookies } = req const { cookies } = req
const cartId = cookies.get(config.cartCookie) const cartId = cookies.get(config.cartCookie)?.value
const customerToken = cookies.get(config.customerCookie) const customerToken = cookies.get(config.customerCookie)?.value
if (!cartId) { if (!cartId) {
return { redirectTo: '/cart' } return { redirectTo: '/cart' }

View File

@ -27,7 +27,7 @@ export type Customer = NonNullable<GetLoggedInCustomerQuery['customer']>
const getLoggedInCustomer: CustomerEndpoint['handlers']['getLoggedInCustomer'] = const getLoggedInCustomer: CustomerEndpoint['handlers']['getLoggedInCustomer'] =
async ({ req, config }) => { async ({ req, config }) => {
const token = req.cookies.get(config.customerCookie) const token = req.cookies.get(config.customerCookie)?.value
if (token) { if (token) {
const { data } = await config.fetch<GetLoggedInCustomerQuery>( const { data } = await config.fetch<GetLoggedInCustomerQuery>(

View File

@ -55,7 +55,7 @@
"zod": "^3.19.1" "zod": "^3.19.1"
}, },
"peerDependencies": { "peerDependencies": {
"next": "^12", "next": "^13",
"react": "^18", "react": "^18",
"react-dom": "^18" "react-dom": "^18"
}, },
@ -68,7 +68,7 @@
"@types/node-fetch": "2.6.2", "@types/node-fetch": "2.6.2",
"@types/react": "^18.0.14", "@types/react": "^18.0.14",
"lint-staged": "^12.1.7", "lint-staged": "^12.1.7",
"next": "^12.0.8", "next": "^13.0.6",
"prettier": "^2.5.1", "prettier": "^2.5.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",

View File

@ -29,7 +29,7 @@ const cartEndpoint: GetAPISchema<
let output let output
const { cookies } = req const { cookies } = req
const cartId = cookies.get(config.cartCookie) const cartId = cookies.get(config.cartCookie)?.value
// Return current cart info // Return current cart info
if (req.method === 'GET') { if (req.method === 'GET') {

View File

@ -22,7 +22,7 @@ const checkoutEndpoint: GetAPISchema<
}) })
const { cookies } = req const { cookies } = req
const cartId = cookies.get(config.cartCookie)! const cartId = cookies.get(config.cartCookie)?.value
const input = await getInput(req) const input = await getInput(req)
// Get checkout // Get checkout

View File

@ -33,7 +33,7 @@ const customerShippingEndpoint: GetAPISchema<
const { cookies } = req const { cookies } = req
// Cart id might be usefull for anonymous shopping // Cart id might be usefull for anonymous shopping
const cartId = cookies.get(config.cartCookie) const cartId = cookies.get(config.cartCookie)?.value
// Return customer addresses // Return customer addresses
if (req.method === 'GET') { if (req.method === 'GET') {

View File

@ -31,7 +31,7 @@ const customerCardEndpoint: GetAPISchema<
const { cookies } = req const { cookies } = req
// Cart id might be usefull for anonymous shopping // Cart id might be usefull for anonymous shopping
const cartId = cookies.get(config.cartCookie) const cartId = cookies.get(config.cartCookie)?.value
// Create or add a card // Create or add a card
if (req.method === 'GET') { if (req.method === 'GET') {

View File

@ -1,6 +1,6 @@
import type { CustomerSchema } from '../../../types/customer' import type { CustomerSchema } from '../../../types/customer'
import type { GetAPISchema } from '../..' import type { GetAPISchema } from '../..'
import { z } from 'zod'
import { parse } from '../../utils' import { parse } from '../../utils'
import validateHandlers from '../../utils/validate-handlers' import validateHandlers from '../../utils/validate-handlers'
@ -19,7 +19,14 @@ const customerEndpoint: GetAPISchema<
const body = null const body = null
const output = await handlers['getLoggedInCustomer']({ ...ctx, body }) const output = await handlers['getLoggedInCustomer']({ ...ctx, body })
return output ? parse(output, customerSchema) : { status: 204 } return output
? parse(
output,
z.object({
customer: customerSchema,
})
)
: { status: 204 }
} }
export default customerEndpoint export default customerEndpoint

View File

@ -18,7 +18,7 @@ const signupEndpoint: GetAPISchema<
const input = await getInput(req) const input = await getInput(req)
const { cookies } = req const { cookies } = req
const cartId = cookies.get(config.cartCookie) const cartId = cookies.get(config.cartCookie)?.value
const body = signupBodySchema.parse({ ...input, cartId }) const body = signupBodySchema.parse({ ...input, cartId })
return handlers['signup']({ ...ctx, body }) return handlers['signup']({ ...ctx, body })

View File

@ -28,7 +28,7 @@ const wishlistEndpoint: GetAPISchema<
const { cookies } = req const { cookies } = req
const input = await getInput(req) const input = await getInput(req)
const customerToken = cookies.get(config.customerCookie) const customerToken = cookies.get(config.customerCookie)?.value
const products = new URL(req.url).searchParams.get('products') const products = new URL(req.url).searchParams.get('products')
// Return current wishlist info // Return current wishlist info

View File

@ -55,7 +55,7 @@
"lodash.debounce": "^4.0.8" "lodash.debounce": "^4.0.8"
}, },
"peerDependencies": { "peerDependencies": {
"next": "^12", "next": "^13",
"react": "^18", "react": "^18",
"react-dom": "^18" "react-dom": "^18"
}, },
@ -71,7 +71,7 @@
"@types/node": "^17.0.8", "@types/node": "^17.0.8",
"@types/react": "^18.0.14", "@types/react": "^18.0.14",
"lint-staged": "^12.1.7", "lint-staged": "^12.1.7",
"next": "^12.0.8", "next": "^13.0.6",
"prettier": "^2.5.1", "prettier": "^2.5.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",

View File

@ -53,11 +53,12 @@
"lodash.debounce": "^4.0.8" "lodash.debounce": "^4.0.8"
}, },
"peerDependencies": { "peerDependencies": {
"next": "^12", "next": "^13",
"react": "^18", "react": "^18",
"react-dom": "^18" "react-dom": "^18"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.20.5",
"@graphql-codegen/cli": "^2.7.0", "@graphql-codegen/cli": "^2.7.0",
"@graphql-codegen/schema-ast": "^2.4.1", "@graphql-codegen/schema-ast": "^2.4.1",
"@graphql-codegen/typescript": "^2.4.2", "@graphql-codegen/typescript": "^2.4.2",
@ -71,7 +72,7 @@
"@types/react": "^18.0.14", "@types/react": "^18.0.14",
"graphql": "^16.0.0", "graphql": "^16.0.0",
"lint-staged": "^12.1.7", "lint-staged": "^12.1.7",
"next": "^12.0.8", "next": "^13.0.6",
"prettier": "^2.5.1", "prettier": "^2.5.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",

View File

@ -8,7 +8,8 @@ const removeItem: CartEndpoint['handlers']['removeItem'] = async ({
body: { itemId }, body: { itemId },
config, config,
}) => { }) => {
const encodedToken = req.cookies.get(config.customerCookie) const encodedToken = req.cookies.get(config.customerCookie)?.value
const token = encodedToken const token = encodedToken
? Buffer.from(encodedToken, 'base64').toString('ascii') ? Buffer.from(encodedToken, 'base64').toString('ascii')
: null : null

View File

@ -8,7 +8,7 @@ const updateItem: CartEndpoint['handlers']['updateItem'] = async ({
body: { itemId, item }, body: { itemId, item },
config, config,
}) => { }) => {
const encodedToken = req.cookies.get(config.cartCookie) const encodedToken = req.cookies.get(config.cartCookie)?.value
const token = encodedToken const token = encodedToken
? Buffer.from(encodedToken, 'base64').toString('ascii') ? Buffer.from(encodedToken, 'base64').toString('ascii')
: null : null

View File

@ -19,7 +19,7 @@ export default class CookieHandler {
this.config = config this.config = config
this.request = req this.request = req
const encodedToken = req.cookies.get(config.customerCookie) const encodedToken = req.cookies.get(config.customerCookie)?.value
const token = parseCookie(encodedToken) const token = parseCookie(encodedToken)
this.accessToken = token ? token.accessToken : null this.accessToken = token ? token.accessToken : null
} }
@ -36,7 +36,7 @@ export default class CookieHandler {
} }
isShopperCookieAnonymous() { isShopperCookieAnonymous() {
const customerCookieKey = this.config.customerCookie const customerCookieKey = this.config.customerCookie
const shopperCookie = this.request.cookies.get(customerCookieKey) const shopperCookie = this.request.cookies.get(customerCookieKey)?.value
const shopperSession = parseCookie(shopperCookie) const shopperSession = parseCookie(shopperCookie)
const isAnonymous = shopperSession?.customerAccount ? false : true const isAnonymous = shopperSession?.customerAccount ? false : true
return isAnonymous return isAnonymous

View File

@ -50,7 +50,7 @@
"@vercel/commerce": "workspace:*" "@vercel/commerce": "workspace:*"
}, },
"peerDependencies": { "peerDependencies": {
"next": "^12", "next": "^13",
"react": "^18", "react": "^18",
"react-dom": "^18" "react-dom": "^18"
}, },
@ -62,7 +62,7 @@
"@types/react": "^18.0.14", "@types/react": "^18.0.14",
"@types/node-fetch": "2.6.2", "@types/node-fetch": "2.6.2",
"lint-staged": "^12.1.7", "lint-staged": "^12.1.7",
"next": "^12.0.8", "next": "^13.0.6",
"prettier": "^2.5.1", "prettier": "^2.5.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",

View File

@ -52,7 +52,7 @@
"cookie": "^0.4.1" "cookie": "^0.4.1"
}, },
"peerDependencies": { "peerDependencies": {
"next": "^12", "next": "^13",
"react": "^18", "react": "^18",
"react-dom": "^18" "react-dom": "^18"
}, },
@ -66,7 +66,7 @@
"@types/cookie": "^0.4.1", "@types/cookie": "^0.4.1",
"@types/node-fetch": "^2.6.2", "@types/node-fetch": "^2.6.2",
"lint-staged": "^12.1.7", "lint-staged": "^12.1.7",
"next": "^12.0.8", "next": "^13.0.6",
"prettier": "^2.5.1", "prettier": "^2.5.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",

View File

@ -10,7 +10,7 @@ const addItem: CartEndpoint['handlers']['addItem'] = async ({
config: { restBuyerFetch, cartCookie, tokenCookie }, config: { restBuyerFetch, cartCookie, tokenCookie },
}) => { }) => {
// Get token // Get token
let token = req.cookies.get(tokenCookie) let token = req.cookies.get(tokenCookie)?.value
let headers: any = {} let headers: any = {}
// Create an order if it doesn't exist // Create an order if it doesn't exist

View File

@ -16,7 +16,7 @@ const getCart: CartEndpoint['handlers']['getCart'] = async ({
try { try {
// Get token // Get token
const token = req.cookies.get(tokenCookie) const token = req.cookies.get(tokenCookie)?.value
// Get cart & line items // Get cart & line items
const [cart, { Items }] = await Promise.all([ const [cart, { Items }] = await Promise.all([

View File

@ -7,7 +7,7 @@ const removeItem: CartEndpoint['handlers']['removeItem'] = async ({
body: { cartId, itemId }, body: { cartId, itemId },
config: { restBuyerFetch, tokenCookie }, config: { restBuyerFetch, tokenCookie },
}) => { }) => {
const token = req.cookies.get(tokenCookie) const token = req.cookies.get(tokenCookie)?.value
// Remove the item to the order // Remove the item to the order
await restBuyerFetch( await restBuyerFetch(

View File

@ -9,7 +9,7 @@ const updateItem: CartEndpoint['handlers']['updateItem'] = async ({
body: { cartId, itemId, item }, body: { cartId, itemId, item },
config: { restBuyerFetch, tokenCookie }, config: { restBuyerFetch, tokenCookie },
}) => { }) => {
const token = req.cookies.get(tokenCookie) const token = req.cookies.get(tokenCookie)?.value
// Store specs // Store specs
let specs: RawVariant['Specs'] = [] let specs: RawVariant['Specs'] = []

View File

@ -7,7 +7,7 @@ const getProducts: ProductsEndpoint['handlers']['getProducts'] = async ({
body: { search, categoryId }, body: { search, categoryId },
config: { restBuyerFetch, tokenCookie }, config: { restBuyerFetch, tokenCookie },
}) => { }) => {
const token = req.cookies.get(tokenCookie) const token = req.cookies.get(tokenCookie)?.value
//Use a dummy base as we only care about the relative path //Use a dummy base as we only care about the relative path
const url = new URL('/me/products', 'http://a') const url = new URL('/me/products', 'http://a')

View File

@ -5,7 +5,7 @@ const getCheckout: CheckoutEndpoint['handlers']['getCheckout'] = async ({
body: { cartId }, body: { cartId },
config: { restBuyerFetch }, config: { restBuyerFetch },
}) => { }) => {
const token = req.cookies.get('token') const token = req.cookies.get('token')?.value
// Register credit card // Register credit card
const payments = await restBuyerFetch( const payments = await restBuyerFetch(

View File

@ -5,7 +5,7 @@ const submitCheckout: CheckoutEndpoint['handlers']['submitCheckout'] = async ({
body: { cartId }, body: { cartId },
config: { restBuyerFetch, tokenCookie }, config: { restBuyerFetch, tokenCookie },
}) => { }) => {
const token = req.cookies.get(tokenCookie) const token = req.cookies.get(tokenCookie)?.value
// Submit order // Submit order
await restBuyerFetch('POST', `/orders/Outgoing/${cartId}/submit`, null, { await restBuyerFetch('POST', `/orders/Outgoing/${cartId}/submit`, null, {

View File

@ -5,7 +5,7 @@ const addItem: CustomerAddressEndpoint['handlers']['addItem'] = async ({
body: { item, cartId }, body: { item, cartId },
config: { restBuyerFetch, tokenCookie }, config: { restBuyerFetch, tokenCookie },
}) => { }) => {
const token = req.cookies.get(tokenCookie) const token = req.cookies.get(tokenCookie)?.value
// Register address // Register address
const address = await restBuyerFetch('POST', `/me/addresses`, { const address = await restBuyerFetch('POST', `/me/addresses`, {

View File

@ -7,7 +7,7 @@ const addItem: CustomerCardEndpoint['handlers']['addItem'] = async ({
config: { restBuyerFetch, tokenCookie }, config: { restBuyerFetch, tokenCookie },
}) => { }) => {
// Get token // Get token
const token = req.cookies.get(tokenCookie) const token = req.cookies.get(tokenCookie)?.value
const [exp_month, exp_year] = item.cardExpireDate.split('/') const [exp_month, exp_year] = item.cardExpireDate.split('/')
const stripeToken = await fetch('https://api.stripe.com/v1/tokens', { const stripeToken = await fetch('https://api.stripe.com/v1/tokens', {

View File

@ -54,11 +54,12 @@
"lodash.debounce": "^4.0.8" "lodash.debounce": "^4.0.8"
}, },
"peerDependencies": { "peerDependencies": {
"next": "^12", "next": "^13",
"react": "^18", "react": "^18",
"react-dom": "^18" "react-dom": "^18"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.20.5",
"@graphql-codegen/cli": "^2.7.0", "@graphql-codegen/cli": "^2.7.0",
"@graphql-codegen/schema-ast": "^2.4.1", "@graphql-codegen/schema-ast": "^2.4.1",
"@graphql-codegen/typescript": "^2.4.2", "@graphql-codegen/typescript": "^2.4.2",
@ -73,7 +74,7 @@
"@types/react": "^18.0.14", "@types/react": "^18.0.14",
"graphql": "^16.0.0", "graphql": "^16.0.0",
"lint-staged": "^12.1.7", "lint-staged": "^12.1.7",
"next": "^12.0.8", "next": "^13.0.6",
"prettier": "^2.5.1", "prettier": "^2.5.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",

View File

@ -51,7 +51,7 @@
"commerce-sdk": "^2.7.0" "commerce-sdk": "^2.7.0"
}, },
"peerDependencies": { "peerDependencies": {
"next": "^12", "next": "^13",
"react": "^18", "react": "^18",
"react-dom": "^18" "react-dom": "^18"
}, },
@ -63,7 +63,7 @@
"@types/react": "^18.0.14", "@types/react": "^18.0.14",
"@types/node-fetch": "^2.6.2", "@types/node-fetch": "^2.6.2",
"lint-staged": "^12.1.7", "lint-staged": "^12.1.7",
"next": "^12.0.8", "next": "^13.0.6",
"prettier": "^2.5.1", "prettier": "^2.5.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",

View File

@ -54,11 +54,12 @@
"lodash.debounce": "^4.0.8" "lodash.debounce": "^4.0.8"
}, },
"peerDependencies": { "peerDependencies": {
"next": "^12", "next": "^13",
"react": "^18", "react": "^18",
"react-dom": "^18" "react-dom": "^18"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.20.5",
"@graphql-codegen/cli": "2.7.0", "@graphql-codegen/cli": "2.7.0",
"@graphql-codegen/schema-ast": "^2.4.1", "@graphql-codegen/schema-ast": "^2.4.1",
"@graphql-codegen/typescript": "^2.6.0", "@graphql-codegen/typescript": "^2.6.0",
@ -69,10 +70,10 @@
"@types/js-cookie": "3.0.2", "@types/js-cookie": "3.0.2",
"@types/lodash.debounce": "^4.0.7", "@types/lodash.debounce": "^4.0.7",
"@types/node": "^18.0.3", "@types/node": "^18.0.3",
"@types/react": "^18.0.14",
"@types/node-fetch": "2.6.2", "@types/node-fetch": "2.6.2",
"graphql": "^16.0.0", "@types/react": "^18.0.14",
"dotenv": "^16.0.1", "dotenv": "^16.0.1",
"graphql": "^16.0.0",
"lint-staged": "^13.0.3", "lint-staged": "^13.0.3",
"next": "^12.2.1", "next": "^12.2.1",
"prettier": "^2.7.1", "prettier": "^2.7.1",

View File

@ -11,15 +11,16 @@ const getCheckout: CheckoutEndpoint['handlers']['getCheckout'] = async ({
config, config,
}) => { }) => {
const { cookies } = req const { cookies } = req
const checkoutUrl = cookies.get(SHOPIFY_CHECKOUT_URL_COOKIE) const checkoutUrl = cookies.get(SHOPIFY_CHECKOUT_URL_COOKIE)?.value
const customerCookie = cookies.get(SHOPIFY_CUSTOMER_TOKEN_COOKIE) const customerCookie = cookies.get(SHOPIFY_CUSTOMER_TOKEN_COOKIE)?.value
if (customerCookie) { if (customerCookie) {
try { try {
await config.fetch(associateCustomerWithCheckoutMutation, { await config.fetch(associateCustomerWithCheckoutMutation, {
variables: { variables: {
checkoutId: cookies.get(SHOPIFY_CHECKOUT_ID_COOKIE), checkoutId: cookies.get(SHOPIFY_CHECKOUT_ID_COOKIE)?.value,
customerAccessToken: cookies.get(SHOPIFY_CUSTOMER_TOKEN_COOKIE), customerAccessToken: cookies.get(SHOPIFY_CUSTOMER_TOKEN_COOKIE)
?.value,
}, },
}) })
} catch (error) { } catch (error) {

View File

@ -54,7 +54,7 @@
"swr": "^1.3.0" "swr": "^1.3.0"
}, },
"peerDependencies": { "peerDependencies": {
"next": "^12", "next": "^13",
"react": "^18", "react": "^18",
"react-dom": "^18" "react-dom": "^18"
}, },
@ -68,7 +68,7 @@
"@types/node-fetch": "^2.6.2", "@types/node-fetch": "^2.6.2",
"@types/react": "^18.0.14", "@types/react": "^18.0.14",
"lint-staged": "^12.1.7", "lint-staged": "^12.1.7",
"next": "^12.0.8", "next": "^13.0.6",
"prettier": "^2.5.1", "prettier": "^2.5.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",

View File

@ -54,7 +54,7 @@
"swell-js": "^4.0.0-next.0" "swell-js": "^4.0.0-next.0"
}, },
"peerDependencies": { "peerDependencies": {
"next": "^12", "next": "^13",
"react": "^18", "react": "^18",
"react-dom": "^18" "react-dom": "^18"
}, },
@ -68,7 +68,7 @@
"@types/node-fetch": "^2.6.2", "@types/node-fetch": "^2.6.2",
"@types/react": "^18.0.14", "@types/react": "^18.0.14",
"lint-staged": "^12.1.7", "lint-staged": "^12.1.7",
"next": "^12.0.8", "next": "^13.0.6",
"prettier": "^2.5.1", "prettier": "^2.5.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",

View File

@ -7,7 +7,7 @@ const getCheckout: CheckoutEndpoint['handlers']['getCheckout'] = async ({
req, req,
}) => { }) => {
const { cookies } = req const { cookies } = req
const checkoutUrl = cookies.get(SWELL_CHECKOUT_URL_COOKIE) const checkoutUrl = cookies.get(SWELL_CHECKOUT_URL_COOKIE)?.value
if (checkoutUrl) { if (checkoutUrl) {
return { redirectTo: checkoutUrl } return { redirectTo: checkoutUrl }

View File

@ -52,11 +52,12 @@
"@vercel/commerce": "workspace:*" "@vercel/commerce": "workspace:*"
}, },
"peerDependencies": { "peerDependencies": {
"next": "^12", "next": "^13",
"react": "^18", "react": "^18",
"react-dom": "^18" "react-dom": "^18"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.20.5",
"@graphql-codegen/cli": "2.7.0", "@graphql-codegen/cli": "2.7.0",
"@graphql-codegen/schema-ast": "^2.4.1", "@graphql-codegen/schema-ast": "^2.4.1",
"@graphql-codegen/typescript": "^2.4.2", "@graphql-codegen/typescript": "^2.4.2",
@ -69,7 +70,7 @@
"@types/node-fetch": "^2.6.2", "@types/node-fetch": "^2.6.2",
"graphql": "^16.0.0", "graphql": "^16.0.0",
"lint-staged": "^12.1.7", "lint-staged": "^12.1.7",
"next": "^12.0.8", "next": "^13.0.6",
"prettier": "^2.5.1", "prettier": "^2.5.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",

662
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -59,7 +59,7 @@ const UserNav: React.FC<{
)} )}
{process.env.COMMERCE_WISHLIST_ENABLED && ( {process.env.COMMERCE_WISHLIST_ENABLED && (
<li className={s.item}> <li className={s.item}>
<Link href="/wishlist"> <Link href="/wishlist" legacyBehavior>
<a onClick={closeSidebarIfPresent} aria-label="Wishlist"> <a onClick={closeSidebarIfPresent} aria-label="Wishlist">
<Heart /> <Heart />
</a> </a>