diff --git a/apps/client/src/components/PostPage/AssembledPost/index.tsx b/apps/client/src/components/PostPage/AssembledPost/index.tsx index fa6614359..27b13f9e1 100644 --- a/apps/client/src/components/PostPage/AssembledPost/index.tsx +++ b/apps/client/src/components/PostPage/AssembledPost/index.tsx @@ -36,7 +36,7 @@ const AssembledPost: React.FC = ({ postSeq, post }) => { } > - {data.postContent && ( + {(data.postContent || data.fileInfo.length > 0) && ( {data.fileInfo.length > 0 && ( diff --git a/apps/client/src/components/PostPage/PostContent/index.tsx b/apps/client/src/components/PostPage/PostContent/index.tsx index a03d3fe6a..8e3f41b5a 100644 --- a/apps/client/src/components/PostPage/PostContent/index.tsx +++ b/apps/client/src/components/PostPage/PostContent/index.tsx @@ -1,7 +1,5 @@ 'use client'; -import Image from 'next/image'; - import { useGetPostDetail } from 'api/client'; import { filterImages } from 'common'; @@ -23,7 +21,7 @@ const PostContent: React.FC = ({ postSeq }) => { {imageFiles.map((file, index) => ( - {file.fileName} + ))} {data?.postContent} diff --git a/apps/client/src/components/PostPage/PostContent/style.ts b/apps/client/src/components/PostPage/PostContent/style.ts index e956048ef..e6966de37 100644 --- a/apps/client/src/components/PostPage/PostContent/style.ts +++ b/apps/client/src/components/PostPage/PostContent/style.ts @@ -1,3 +1,5 @@ +import Image from 'next/image'; + import styled from '@emotion/styled'; export const ContentWrapper = styled.div` @@ -11,9 +13,12 @@ export const ContentWrapper = styled.div` } `; +export const ContentImage = styled(Image)` + position: relative !important; +`; + export const ImageWrapper = styled.div` width: 50rem; - height: 30.375rem; overflow: hidden; position: relative; img {