mirror of
https://github.com/vercel/commerce.git
synced 2025-06-20 06:01:21 +00:00
make <Image>
Apple M1 comp (workaround)
This commit is contained in:
parent
166bb037e4
commit
243e42929d
@ -1,6 +1,6 @@
|
||||
import { ChangeEvent, FocusEventHandler, useEffect, useState } from 'react'
|
||||
import cn from 'classnames'
|
||||
import Image from 'next/image'
|
||||
import NextImage from 'next/image'
|
||||
import Link from 'next/link'
|
||||
import s from './CartItem.module.css'
|
||||
import { Trash, Plus, Minus, Cross } from '@components/icons'
|
||||
@ -11,6 +11,15 @@ import useUpdateItem from '@framework/cart/use-update-item'
|
||||
import useRemoveItem from '@framework/cart/use-remove-item'
|
||||
import Quantity from '@components/ui/Quantity'
|
||||
|
||||
const Image = (props: any) => {
|
||||
return (
|
||||
<NextImage
|
||||
unoptimized={process.env.NODE_ENV === 'development'}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
type ItemOption = {
|
||||
name: string
|
||||
nameId: number
|
||||
|
@ -3,10 +3,19 @@ import cn from 'classnames'
|
||||
import Link from 'next/link'
|
||||
import type { Product } from '@commerce/types/product'
|
||||
import s from './ProductCard.module.css'
|
||||
import Image, { ImageProps } from 'next/image'
|
||||
import NextImage, { ImageProps } from 'next/image'
|
||||
import WishlistButton from '@components/wishlist/WishlistButton'
|
||||
import usePrice from '@framework/product/use-price'
|
||||
import ProductTag from '../ProductTag'
|
||||
|
||||
const Image = (props: any) => {
|
||||
return (
|
||||
<NextImage
|
||||
unoptimized={process.env.NODE_ENV === 'development'}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
interface Props {
|
||||
className?: string
|
||||
product: Product
|
||||
|
@ -1,5 +1,5 @@
|
||||
import cn from 'classnames'
|
||||
import Image from 'next/image'
|
||||
import NextImage from 'next/image'
|
||||
import { NextSeo } from 'next-seo'
|
||||
import s from './ProductView.module.css'
|
||||
import { FC } from 'react'
|
||||
@ -10,6 +10,15 @@ import { ProductSlider, ProductCard } from '@components/product'
|
||||
import { Container, Text } from '@components/ui'
|
||||
import ProductSidebar from '../ProductSidebar'
|
||||
import ProductTag from '../ProductTag'
|
||||
|
||||
const Image = (props: any) => {
|
||||
return (
|
||||
<NextImage
|
||||
unoptimized={process.env.NODE_ENV === 'development'}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
interface ProductViewProps {
|
||||
product: Product
|
||||
relatedProducts: Product[]
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { FC, useState } from 'react'
|
||||
import cn from 'classnames'
|
||||
import Link from 'next/link'
|
||||
import Image from 'next/image'
|
||||
import NextImage from 'next/image'
|
||||
import s from './WishlistCard.module.css'
|
||||
import { Trash } from '@components/icons'
|
||||
import { Button, Text } from '@components/ui'
|
||||
@ -12,6 +12,15 @@ import usePrice from '@framework/product/use-price'
|
||||
import useAddItem from '@framework/cart/use-add-item'
|
||||
import useRemoveItem from '@framework/wishlist/use-remove-item'
|
||||
|
||||
const Image = (props: any) => {
|
||||
return (
|
||||
<NextImage
|
||||
unoptimized={process.env.NODE_ENV === 'development'}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
interface Props {
|
||||
product: Product
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user