diff --git a/src/page/post-detail-page.tsx b/src/page/post-detail-page.tsx index a357c24..cfa37d6 100644 --- a/src/page/post-detail-page.tsx +++ b/src/page/post-detail-page.tsx @@ -119,6 +119,7 @@ const PostDetailPage = () => { if (!data) return
no data
; const myId = getMyMemberId(); + const imageSrc = data.image && data.image !== 'undefined' ? data.image : null; const isOwner = data.writer?.writerId === myId; const isApplied = participants?.some((p) => p.applicantId === myId) ?? false; @@ -137,7 +138,13 @@ const PostDetailPage = () => { {/* 🔥 이미지 */} - + {imageSrc ? ( + {data.title + ) : ( +
+ 이미지 없음 +
+ )}
{/* 🔥 제목 */} diff --git a/src/widgets/main/card/card.tsx b/src/widgets/main/card/card.tsx index 1d8d704..1d96e01 100644 --- a/src/widgets/main/card/card.tsx +++ b/src/widgets/main/card/card.tsx @@ -18,17 +18,25 @@ export function Card({ location, onClick, }: CardProps) { + const imageSrc = image && image !== 'undefined' ? image : null; + return (
- {title} + {imageSrc ? ( + {title} + ) : ( +
+ 이미지 없음 +
+ )}