Skip to content

Commit

Permalink
Replace next/legacy/image with next/image in listing dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
DinerIsmail committed Nov 25, 2023
1 parent b4bd102 commit 4cf94fb
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions components/main-list/dialog/Dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { memo, useCallback, useEffect, useMemo, useState } from 'react'
import NextLink from 'next/link'
import Image from 'next/legacy/image'
import Image from 'next/image'
import {
Modal,
ModalOverlay,
Expand Down Expand Up @@ -142,18 +142,25 @@ const Dialog = ({
<ModalOverlay />
<ModalContent opacity="1">
{item.image && (
<Image
alt={`${item.label} cover image`}
src={item.image}
objectFit="cover"
width="672"
height="300"
unoptimized
style={{
borderTopLeftRadius: '0.375rem',
borderTopRightRadius: '0.375rem',
}}
/>
<Box
width="672px"
height="300px"
overflow="hidden"
position="relative"
>
<Image
alt={`${item.label} cover image`}
src={item.image}
fill
priority
sizes="(max-width: 768px) 100vw, 672px"
style={{
borderTopLeftRadius: '0.375rem',
borderTopRightRadius: '0.375rem',
objectFit: 'cover',
}}
/>
</Box>
)}

<ModalHeader display="flex" alignItems="center" pb={0}>
Expand Down

1 comment on commit 4cf94fb

@vercel
Copy link

@vercel vercel bot commented on 4cf94fb Nov 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.