Merge branch 'main' into next-eslint

This commit is contained in:
Luis Alvarez D 2021-08-01 17:47:05 -05:00 committed by GitHub
commit 7dd6c04184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 8 additions and 7 deletions

View File

@ -38,6 +38,7 @@ const LoginView: FC<Props> = () => {
} catch ({ errors }) {
setMessage(errors[0].message)
setLoading(false)
setDisabled(false)
}
}

View File

@ -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' && (
<>

View File

@ -10,7 +10,7 @@ type BCCartItemBody = {
product_id: number
variant_id: number
quantity?: number
option_selections?: OptionSelections
option_selections?: OptionSelections[]
}
export const parseWishlistItem = (

View File

@ -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',
})
}

View File

@ -10,7 +10,7 @@ function normalizeProductOption(productOption: any) {
const {
node: {
entityId,
values: { edges },
values: { edges = [] } = {},
...rest
},
} = productOption

View File

@ -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 = {

View File

@ -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',
})
}