Skip to content

Commit

Permalink
fix: 공통 섹션에도 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
lydiacho committed Jul 30, 2024
1 parent 8a586b4 commit 70f3150
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/views/ApplyPage/components/CommonSection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const CommonSection = ({ isReview, refCallback, questions, commonQuestionsDraft
return (
<section ref={refCallback} id="common" className={sectionContainer}>
<h2 className={title}>공통 질문</h2>
{questions?.map(({ urls, value, id, charLimit, isFile }) => {
{questions?.map(({ urls, value, id, charLimit, isFile, placeholder, optional }) => {
const draftItem = commonQuestionsById?.[id];
const defaultValue = draftItem ? draftItem.answer.answer : '';
const defaultFile = { id, file: draftItem?.answer.file, fileName: draftItem?.answer.fileName };
Expand All @@ -39,9 +39,10 @@ const CommonSection = ({ isReview, refCallback, questions, commonQuestionsDraft
defaultValue={defaultValue}
maxCount={charLimit}
placeholder={
isFile
placeholder ||
(isFile
? '링크로 제출할 경우, 이곳에 작성해주세요. (파일로 제출한 경우에는 ‘파일 제출’이라고 기재 후 제출해주세요.)'
: ''
: '')
}
extraInput={
isFile ? (
Expand All @@ -50,7 +51,7 @@ const CommonSection = ({ isReview, refCallback, questions, commonQuestionsDraft
<LinkInput urls={urls} />
) : null
}
required
required={!optional}
disabled={isReview}>
{value}
</Textarea>
Expand Down

0 comments on commit 70f3150

Please sign in to comment.