Skip to content

Commit 1f03731

Browse files
committed
fix visual issue with mobile images
1 parent 03b623b commit 1f03731

File tree

1 file changed

+6
-2
lines changed
  • src/app/(frontend)/[locale]/projects/[id]

1 file changed

+6
-2
lines changed

src/app/(frontend)/[locale]/projects/[id]/page.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { Link } from '@/i18n/navigation'
1616
import { draftMode } from 'next/headers'
1717
import { Metadata } from 'next'
1818
import { convertLexicalToPlaintext } from '@payloadcms/richtext-lexical/plaintext'
19+
import Image from 'next/image'
1920

2021
interface Props {
2122
params: Promise<{
@@ -92,8 +93,11 @@ function PhoneImage(img: ProjectImage): ReactNode {
9293
className={`${img.phoneConf?.imgAlign === 'overflow' ? '' : 'px-8'} py-25 gap-12 flex ${img.phoneConf.descPos === 'n' ? 'flex-col-reverse' : 'flex-col'}`}
9394
style={{ backgroundColor: img.bgColor }}
9495
>
95-
<ImageSkeleton
96-
image={imageFile}
96+
<Image
97+
src={imageFile.url!}
98+
alt={imageFile.alt}
99+
width={imageFile.width!}
100+
height={imageFile.height!}
97101
className={`max-h-160 ${
98102
img.phoneConf?.imgAlign === 'left'
99103
? 'w-4/5 mr-auto'

0 commit comments

Comments
 (0)