make <Image> Apple M1 comp (workaround)

This commit is contained in:
Zaiste
2021-07-09 15:45:16 +02:00
parent 166bb037e4
commit 243e42929d
4 changed files with 40 additions and 4 deletions

View File

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