perf: use OptimizedImage in GalleryGrid
This commit is contained in:
@@ -2,6 +2,7 @@ import DeleteOutlineOutlinedIcon from '@mui/icons-material/DeleteOutlineOutlined
|
|||||||
import Box from '@mui/material/Box'
|
import Box from '@mui/material/Box'
|
||||||
import IconButton from '@mui/material/IconButton'
|
import IconButton from '@mui/material/IconButton'
|
||||||
import Tooltip from '@mui/material/Tooltip'
|
import Tooltip from '@mui/material/Tooltip'
|
||||||
|
import { OptimizedImage } from '@/shared/ui/OptimizedImage'
|
||||||
import type { GalleryImageItem } from '../model/types'
|
import type { GalleryImageItem } from '../model/types'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -31,10 +32,10 @@ export function GalleryGrid({ items, deleting, onDelete }: Props) {
|
|||||||
aspectRatio: '1',
|
aspectRatio: '1',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<OptimizedImage
|
||||||
component="img"
|
|
||||||
src={item.url}
|
src={item.url}
|
||||||
alt=""
|
alt=""
|
||||||
|
sizes="140px"
|
||||||
sx={{ width: '100%', height: '100%', objectFit: 'cover', display: 'block' }}
|
sx={{ width: '100%', height: '100%', objectFit: 'cover', display: 'block' }}
|
||||||
/>
|
/>
|
||||||
<Tooltip title="Удалить из галереи">
|
<Tooltip title="Удалить из галереи">
|
||||||
|
|||||||
Reference in New Issue
Block a user