mirror of
https://github.com/vercel/commerce.git
synced 2025-05-15 05:56:59 +00:00
downgrade next.js: fixes
This commit is contained in:
parent
ea5e8fc486
commit
0c087438e7
@ -14,7 +14,8 @@ export const addItem = async (variantId: string | undefined): Promise<String | u
|
|||||||
if (!cartId || !cart) {
|
if (!cartId || !cart) {
|
||||||
cart = await createCart();
|
cart = await createCart();
|
||||||
cartId = cart.id;
|
cartId = cart.id;
|
||||||
cookies().set('cartId', cartId);
|
// TODO: this is not working under older Next.js versions
|
||||||
|
// cookies().set('cartId', cartId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!variantId) {
|
if (!variantId) {
|
||||||
|
@ -82,7 +82,8 @@ export function VariantSelector({
|
|||||||
aria-disabled={!isAvailableForSale}
|
aria-disabled={!isAvailableForSale}
|
||||||
disabled={!isAvailableForSale}
|
disabled={!isAvailableForSale}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
router.replace(optionUrl, { scroll: false });
|
// TODO: Does now work under old Next.js
|
||||||
|
// router.replace(optionUrl, { scroll: false });
|
||||||
}}
|
}}
|
||||||
title={`${option.name} ${value}${!isAvailableForSale ? ' (Out of Stock)' : ''}`}
|
title={`${option.name} ${value}${!isAvailableForSale ? ' (Out of Stock)' : ''}`}
|
||||||
className={clsx(
|
className={clsx(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user