From fd896c287a670d32546991bd6afa6431c43b04e3 Mon Sep 17 00:00:00 2001 From: winchoose Date: Mon, 16 Mar 2026 12:42:41 +0900 Subject: [PATCH] fix: url undefinde --- src/page/post-detail-page.tsx | 9 ++++++++- src/widgets/main/card/card.tsx | 18 +++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) 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} + ) : ( +
+ 이미지 없음 +
+ )}