Skip to content

Commit

Permalink
refactor: (#123) 선택지 내용입력 element 타입 지정하기
Browse files Browse the repository at this point in the history
  • Loading branch information
chsua committed Jul 27, 2023
1 parent f1b2b56 commit f143a64
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/src/components/PostForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ export default function PostForm({ data, mutate, isError, error }: PostFormProps

imageFileList.map(file => formData.append('images', file));

const optionTextAreas = e.target.querySelectorAll('textarea[name="optionText"]');
const writingOptionList = Array.from(optionTextAreas).map((textarea: any, index) => {
const optionTextAreas = e.target.querySelectorAll<HTMLTextAreaElement>(
'textarea[name="optionText"]'
);
const writingOptionList = Array.from(optionTextAreas).map((textarea, index) => {
return { content: textarea.value, imageURL: options[index].imageUrl };
});

Expand Down

0 comments on commit f143a64

Please sign in to comment.