Skip to content

Commit

Permalink
Update image size
Browse files Browse the repository at this point in the history
  • Loading branch information
frorong committed Aug 18, 2023
1 parent 2f8a7f4 commit db25830
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 1 addition & 3 deletions apps/client/src/components/PostPage/PostContent/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use client';

import Image from 'next/image';

import { useGetPostDetail } from 'api/client';

import { filterImages } from 'common';
Expand All @@ -23,7 +21,7 @@ const PostContent: React.FC<PostContentProps> = ({ postSeq }) => {
<S.ContentWrapper>
{imageFiles.map((file, index) => (
<S.ImageWrapper key={index}>
<Image src={file.fileUrl} alt={file.fileName} fill />
<S.ContentImage src={file.fileUrl} alt={file.fileName} fill />
</S.ImageWrapper>
))}
<S.ContentText>{data?.postContent}</S.ContentText>
Expand Down
7 changes: 6 additions & 1 deletion apps/client/src/components/PostPage/PostContent/style.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Image from 'next/image';

import styled from '@emotion/styled';

export const ContentWrapper = styled.div`
Expand All @@ -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 {
Expand Down

0 comments on commit db25830

Please sign in to comment.