Fix next/image

This commit is contained in:
Catalin Pinte 2022-11-01 10:45:36 +02:00
parent f4abd321c8
commit 1ef5f14a0a
7 changed files with 8 additions and 7 deletions

View File

@ -1,6 +1,6 @@
import { ChangeEvent, FocusEventHandler, useEffect, useState } from 'react' import { ChangeEvent, FocusEventHandler, useEffect, useState } from 'react'
import cn from 'clsx' import cn from 'clsx'
import Image from 'next/image' import Image from 'next/legacy/image'
import Link from 'next/link' import Link from 'next/link'
import s from './CartItem.module.css' import s from './CartItem.module.css'
import { useUI } from '@components/ui/context' import { useUI } from '@components/ui/context'

View File

@ -52,6 +52,7 @@ const HomeAllProductsGrid: FC<Props> = ({
product={product} product={product}
variant="simple" variant="simple"
imgProps={{ imgProps={{
alt: product.name,
width: 480, width: 480,
height: 480, height: 480,
}} }}

View File

@ -5,7 +5,7 @@ import { useRouter } from 'next/router'
import s from './I18nWidget.module.css' import s from './I18nWidget.module.css'
import { Cross, ChevronUp } from '@components/icons' import { Cross, ChevronUp } from '@components/icons'
import ClickOutside from '@lib/click-outside' import ClickOutside from '@lib/click-outside'
import Image from 'next/image' import Image from 'next/legacy/image'
interface LOCALE_DATA { interface LOCALE_DATA {
name: string name: string
img: { img: {

View File

@ -3,7 +3,7 @@ import cn from 'clsx'
import Link from 'next/link' import Link from 'next/link'
import type { Product } from '@commerce/types/product' import type { Product } from '@commerce/types/product'
import s from './ProductCard.module.css' import s from './ProductCard.module.css'
import Image, { ImageProps } from 'next/image' import Image, { ImageProps } from 'next/legacy/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'

View File

@ -1,5 +1,5 @@
import cn from 'clsx' import cn from 'clsx'
import Image from 'next/image' import Image from 'next/legacy/image'
import s from './ProductView.module.css' import s from './ProductView.module.css'
import { FC } from 'react' import { FC } from 'react'
import type { Product } from '@commerce/types/product' import type { Product } from '@commerce/types/product'

View File

@ -1,7 +1,7 @@
import { FC, useState } from 'react' import { FC, useState } from 'react'
import cn from 'clsx' import cn from 'clsx'
import Link from 'next/link' import Link from 'next/link'
import Image from 'next/image' import Image from 'next/legacy/image'
import s from './WishlistCard.module.css' import s from './WishlistCard.module.css'
import { Trash } from '@components/icons' import { Trash } from '@components/icons'
import { Button, Text } from '@components/ui' import { Button, Text } from '@components/ui'

View File

@ -23,8 +23,8 @@
"@components/*": ["components/*"], "@components/*": ["components/*"],
"@commerce": ["../packages/commerce/src"], "@commerce": ["../packages/commerce/src"],
"@commerce/*": ["../packages/commerce/src/*"], "@commerce/*": ["../packages/commerce/src/*"],
"@framework": ["../packages/shopify/src"], "@framework": ["../packages/local/src"],
"@framework/*": ["../packages/shopify/src/*"] "@framework/*": ["../packages/local/src/*"]
} }
}, },
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"], "include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],