mirror of
https://github.com/vercel/commerce.git
synced 2025-05-19 07:56:59 +00:00
fix issue with AddManyToCart props
This commit is contained in:
parent
a201608849
commit
c789a85a2c
@ -136,7 +136,6 @@ export default async function ProductPage({
|
|||||||
<VariantSelector options={product.options} variants={product.variants} />
|
<VariantSelector options={product.options} variants={product.variants} />
|
||||||
|
|
||||||
<AddManyToCart
|
<AddManyToCart
|
||||||
product={product}
|
|
||||||
quantity={1}
|
quantity={1}
|
||||||
variants={product.variants}
|
variants={product.variants}
|
||||||
availableForSale={product.availableForSale}
|
availableForSale={product.availableForSale}
|
||||||
|
@ -3,19 +3,17 @@
|
|||||||
import { ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/24/outline';
|
import { ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/24/outline';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import LoadingDots from 'components/loading-dots';
|
import LoadingDots from 'components/loading-dots';
|
||||||
import { Product, ProductVariant } from 'lib/shopify/types';
|
import { ProductVariant } from 'lib/shopify/types';
|
||||||
import { useTranslations } from 'next-intl';
|
import { useTranslations } from 'next-intl';
|
||||||
import { useRouter, useSearchParams } from 'next/navigation';
|
import { useRouter, useSearchParams } from 'next/navigation';
|
||||||
import { useState, useTransition } from 'react';
|
import { useState, useTransition } from 'react';
|
||||||
import { addItems } from './actions';
|
import { addItems } from './actions';
|
||||||
|
|
||||||
export function AddManyToCart({
|
export function AddManyToCart({
|
||||||
product,
|
|
||||||
quantity = 1,
|
quantity = 1,
|
||||||
variants,
|
variants,
|
||||||
availableForSale
|
availableForSale
|
||||||
}: {
|
}: {
|
||||||
product: Product;
|
|
||||||
quantity: number;
|
quantity: number;
|
||||||
variants: ProductVariant[];
|
variants: ProductVariant[];
|
||||||
availableForSale: boolean;
|
availableForSale: boolean;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user