Skip to content

Commit

Permalink
fix: 게시글에 이미지가 없는 경우 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
wch2208 committed Jun 8, 2024
1 parent a512dd5 commit dea9cc7
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions pages/addboard/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,16 @@ const AddBoardId: React.FC<AddBoardIdProps> = ({ articleData, comments }) => {
</div>
<div className="divider border-cool-gary-200 border-b my-16" />
<div className="flex flex-col">
<div className="image-container aspect-w-16 aspect-h-9">
<Image
src={`${articleData.image}`}
alt="첨부이미지"
layout="fill"
objectFit="contain"
/>
</div>
{articleData.image && (
<div className="image-container aspect-w-16 aspect-h-9">
<Image
src={`${articleData.image}`}
alt="첨부이미지"
layout="fill"
objectFit="contain"
/>
</div>
)}
<div className="mb-40 flex-auto">{articleData.content}</div>
</div>
{/* 댓글 영역 */}
Expand Down

0 comments on commit dea9cc7

Please sign in to comment.