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 }) { } catch ({ errors }) {
setMessage(errors[0].message) setMessage(errors[0].message)
setLoading(false) setLoading(false)
setDisabled(false)
} }
} }

View File

@ -7,6 +7,7 @@ import Image, { ImageProps } from 'next/image'
import WishlistButton from '@components/wishlist/WishlistButton' import WishlistButton from '@components/wishlist/WishlistButton'
import usePrice from '@framework/product/use-price' import usePrice from '@framework/product/use-price'
import ProductTag from '../ProductTag' import ProductTag from '../ProductTag'
interface Props { interface Props {
className?: string className?: string
product: Product product: Product
@ -23,7 +24,6 @@ const ProductCard: FC<Props> = ({
className, className,
noNameTag = false, noNameTag = false,
variant = 'default', variant = 'default',
...props
}) => { }) => {
const { price } = usePrice({ const { price } = usePrice({
amount: product.price.value, amount: product.price.value,
@ -38,7 +38,7 @@ const ProductCard: FC<Props> = ({
) )
return ( return (
<Link href={`/product/${product.slug}`} {...props}> <Link href={`/product/${product.slug}`}>
<a className={rootClassName}> <a className={rootClassName}>
{variant === 'slim' && ( {variant === 'slim' && (
<> <>

View File

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

View File

@ -16,7 +16,7 @@ export const handler: MutationHook<LoginHook> = {
if (!(email && password)) { if (!(email && password)) {
throw new CommerceError({ throw new CommerceError({
message: 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 { const {
node: { node: {
entityId, entityId,
values: { edges }, values: { edges = [] } = {},
...rest ...rest
}, },
} = productOption } = productOption

View File

@ -40,7 +40,7 @@ export type OptionSelections = {
export type CartItemBody = Core.CartItemBody & { export type CartItemBody = Core.CartItemBody & {
productId: string // The product id is always required for BC productId: string // The product id is always required for BC
optionSelections?: OptionSelections optionSelections?: OptionSelections[]
} }
export type CartTypes = { export type CartTypes = {

View File

@ -22,7 +22,7 @@ export const handler: MutationHook<LoginHook> = {
if (!(email && password)) { if (!(email && password)) {
throw new CommerceError({ throw new CommerceError({
message: message:
'A first name, last name, email and password are required to login', 'An email and password are required to login',
}) })
} }