mirror of
https://github.com/vercel/commerce.git
synced 2025-06-19 21:51:21 +00:00
Merge branch 'main' into next-eslint
This commit is contained in:
commit
7dd6c04184
@ -38,6 +38,7 @@ const LoginView: FC<Props> = () => {
|
||||
} catch ({ errors }) {
|
||||
setMessage(errors[0].message)
|
||||
setLoading(false)
|
||||
setDisabled(false)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@ import Image, { ImageProps } from 'next/image'
|
||||
import WishlistButton from '@components/wishlist/WishlistButton'
|
||||
import usePrice from '@framework/product/use-price'
|
||||
import ProductTag from '../ProductTag'
|
||||
|
||||
interface Props {
|
||||
className?: string
|
||||
product: Product
|
||||
@ -23,7 +24,6 @@ const ProductCard: FC<Props> = ({
|
||||
className,
|
||||
noNameTag = false,
|
||||
variant = 'default',
|
||||
...props
|
||||
}) => {
|
||||
const { price } = usePrice({
|
||||
amount: product.price.value,
|
||||
@ -38,7 +38,7 @@ const ProductCard: FC<Props> = ({
|
||||
)
|
||||
|
||||
return (
|
||||
<Link href={`/product/${product.slug}`} {...props}>
|
||||
<Link href={`/product/${product.slug}`}>
|
||||
<a className={rootClassName}>
|
||||
{variant === 'slim' && (
|
||||
<>
|
||||
|
@ -10,7 +10,7 @@ type BCCartItemBody = {
|
||||
product_id: number
|
||||
variant_id: number
|
||||
quantity?: number
|
||||
option_selections?: OptionSelections
|
||||
option_selections?: OptionSelections[]
|
||||
}
|
||||
|
||||
export const parseWishlistItem = (
|
||||
|
@ -16,7 +16,7 @@ export const handler: MutationHook<LoginHook> = {
|
||||
if (!(email && password)) {
|
||||
throw new CommerceError({
|
||||
message:
|
||||
'A first name, last name, email and password are required to login',
|
||||
'An email and password are required to login',
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ function normalizeProductOption(productOption: any) {
|
||||
const {
|
||||
node: {
|
||||
entityId,
|
||||
values: { edges },
|
||||
values: { edges = [] } = {},
|
||||
...rest
|
||||
},
|
||||
} = productOption
|
||||
|
@ -40,7 +40,7 @@ export type OptionSelections = {
|
||||
|
||||
export type CartItemBody = Core.CartItemBody & {
|
||||
productId: string // The product id is always required for BC
|
||||
optionSelections?: OptionSelections
|
||||
optionSelections?: OptionSelections[]
|
||||
}
|
||||
|
||||
export type CartTypes = {
|
||||
|
@ -22,7 +22,7 @@ export const handler: MutationHook<LoginHook> = {
|
||||
if (!(email && password)) {
|
||||
throw new CommerceError({
|
||||
message:
|
||||
'A first name, last name, email and password are required to login',
|
||||
'An email and password are required to login',
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user