Skip to content

Commit

Permalink
[BUG] 모바일/데스크탑에서 사진을 2번씩 눌러야 이미지 첨부가 돼요 (#469)
Browse files Browse the repository at this point in the history
* feat: (#468) 이미지 업로드 시 파일창이 두번 나오는 오류 수정

- 기본 이벤트로 인한 호출 오류

* feat: 사용자에게 보여지는 안내문구 수정
  • Loading branch information
chsua authored and tjdtls690 committed Sep 12, 2023
1 parent c4edda9 commit ade8c05
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChangeEvent, MutableRefObject } from 'react';
import { ChangeEvent, MouseEvent, MutableRefObject } from 'react';

import { Size } from '@type/style';

Expand All @@ -18,7 +18,8 @@ interface ContentImageSectionProps {
export default function ContentImageSection({ contentImageHook, size }: ContentImageSectionProps) {
const { contentImage, contentInputRef, removeImage, handleUploadImage } = contentImageHook;

const handleButtonClick = () => {
const handleButtonClick = (e: MouseEvent<HTMLButtonElement>) => {
e.preventDefault();
contentInputRef.current && contentInputRef.current.click();
};

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/common/Post/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function Post({ postInfo, isPreview }: PostProps) {

const handleVoteClick = (newOptionId: number) => {
if (!loggedInfo.isLoggedIn) {
openToast('투표를 하려면 로그인 후에 이용하실 수 있습니다.');
openToast('투표는 로그인 후에 이용하실 수 있습니다.');
return;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useRef } from 'react';
import React, { MouseEvent, useRef } from 'react';

import photoIcon from '@assets/photo_white.svg';

Expand All @@ -17,7 +17,8 @@ export default function OptionUploadImageButton({
const inputRef = useRef<HTMLInputElement>(null);
const id = optionId.toString();

const handleButtonClick = () => {
const handleButtonClick = (e: MouseEvent<HTMLButtonElement>) => {
e.preventDefault();
inputRef.current && inputRef.current.click();
};

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Error/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function Error({ message }: { message?: string }) {
<S.Wrapper>
<S.Description>{message ? message : '요청 중 오류가 발생했습니다.'}</S.Description>
<LogoButton content="icon" style={{ width: '100px', height: '100px' }} />
<S.Text>오류가 지속되는 경우 votogether@gmail.com 로 문의해주세요.</S.Text>
<S.Text>오류가 지속되는 경우 votogether2023@gmail.com 로 문의해주세요.</S.Text>
<S.ButtonWrapper>
<SquareButton
theme="fill"
Expand Down
1 change: 0 additions & 1 deletion frontend/src/pages/MyInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ export default function MyInfo() {
<li>- {NICKNAME_POLICY.LETTER_AMOUNT}</li>
<li>- {NICKNAME_POLICY.LIMIT_LETTER_TYPE}</li>
<li>- {NICKNAME_POLICY.NO_DUPLICATION}</li>
<li>- {NICKNAME_POLICY.LIMIT_CHANGING}</li>
</S.DescribeUl>
<S.InputWrapper>
<S.Input
Expand Down

0 comments on commit ade8c05

Please sign in to comment.