Skip to content

Commit

Permalink
refactor: 변수와 함수명 통일화
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeonjinan096 committed Jul 6, 2024
1 parent 87805d6 commit fac53a1
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,19 @@ const VoteResult = () => {
} = useGetVoteDetailAPI(postId);

const maxCount = Math.max(...voteOptions.map(({ count }) => count));
const [isShow, setIsShow] = useState<boolean>(false);
const [isShowModal, setIsShowModal] = useState<boolean>(false);
const [selectedImage, setSelectedImage] = useState<string>('');
const { isAuthor } = useGetPostDetailAPI(postId);

const showImageModal = (url: string) => {
setIsShow(true);
setIsShowModal(true);
setSelectedImage(url);
};

const handelCloseModal = () => {
setIsShowModal(false);
};

return (
<div className='flex items-center justify-center rounded-[8px] bg-gray-accent1'>
<div className='flex w-full flex-col gap-6 p-4'>
Expand Down Expand Up @@ -112,7 +116,7 @@ const VoteResult = () => {
{isTerminated ? '종료된 투표입니다.' : '투표 완료'}
</button>
</div>
<FullScreenModal show={isShow} onClose={() => setIsShow(false)}>
<FullScreenModal show={isShowModal} onClose={handelCloseModal}>
<div className='flex h-full w-full items-center'>
<div className='relative h-[260px] w-full'>
<Image src={selectedImage} alt='로고' fill />
Expand Down

0 comments on commit fac53a1

Please sign in to comment.