fix: 퀴즈셋, 퀴즈 제외 maxlength 및 maxlength 안내문구 수정

This commit is contained in:
정기영 2024-08-13 13:49:21 +09:00
parent 72aa60cefb
commit dfcf677cf2
9 changed files with 26 additions and 19 deletions

View File

@ -52,8 +52,7 @@ export default function ArticleDetailAnswerInput({ onSubmit, initialAnswer = '',
placeholder="답변 작성하기"
className={styles.input}
/>
{answer && answer.length > 950 && <div className={styles.textLength}>{answer.length} / 1000</div>}
{answer && answer.length > 999 && <div className={styles.textLength}>최대 1000글자까지 작성할 있습니다.</div>}
<button
type="submit"
className={styles.button}

View File

@ -51,7 +51,7 @@ export default function CreateArticle({ topic, title, onSubmit }) {
value={articleTitle}
onChange={(e) => setArticleTitle(e.target.value)}
/>
{articleTitle.length > 49 && <div className={styles.textLength}>{articleTitle.length} / 50</div>}
{articleTitle.length > 49 && <div className={styles.textLength}>최대 50글자까지 작성할 있습니다.</div>}
</div>
<div className={styles.fieldWrapper}>
<label className={styles.label}>내용</label>
@ -64,7 +64,9 @@ export default function CreateArticle({ topic, title, onSubmit }) {
onChange={handleInput}
style={{ overflow: 'hidden' }}
></textarea>
{articleContent.length > 999 && <div className={styles.textLength}>{articleContent.length} / 1000</div>}
{articleContent.length > 999 && (
<div className={styles.textLength}>최대 1000글자까지 작성할 있습니다.</div>
)}
</div>
<button
type="button"

View File

@ -50,7 +50,7 @@ export default function EditArticle({ topic, title, prevTitle, prevContent, onSu
value={articleTitle}
onChange={(e) => setArticleTitle(e.target.value)}
/>
{articleTitle.length > 49 && <div className={styles.textLength}>{articleTitle.length} / 50</div>}
{articleTitle.length > 49 && <div className={styles.textLength}>최대 50글자까지 작성할 있습니다.</div>}
</div>
<div className={styles.fieldWrapper}>
<label className={styles.label}>내용</label>
@ -62,7 +62,9 @@ export default function EditArticle({ topic, title, prevTitle, prevContent, onSu
value={articleContent}
onChange={handleInput}
></textarea>
{articleContent.length > 950 && <div className={styles.textLength}>{articleContent.length} / 1000</div>}
{articleContent.length > 999 && (
<div className={styles.textLength}>최대 1000글자까지 작성할 있습니다.</div>
)}
</div>
<button
type="button"

View File

@ -50,7 +50,7 @@ export default function EditFreeboard({ topic, title, prevContent, prevTitle, on
value={articleTitle}
onChange={(e) => setArticleTitle(e.target.value)}
/>
{articleTitle.length > 49 && <div className={styles.textLength}>{articleTitle.length} / 50</div>}
{articleTitle.length > 49 && <div className={styles.textLength}>최대 50글자까지 작성할 있습니다.</div>}
</div>
<div className={styles.fieldWrapper}>
<label className={styles.label}>내용</label>
@ -62,7 +62,9 @@ export default function EditFreeboard({ topic, title, prevContent, prevTitle, on
value={articleContent}
onChange={handleInput}
></textarea>
{articleContent.length > 999 && <div className={styles.textLength}>{articleContent.length} / 1000</div>}
{articleContent.length > 999 && (
<div className={styles.textLength}>최대 1000글자까지 작성할 있습니다.</div>
)}
</div>
<button
type="button"

View File

@ -50,7 +50,7 @@ export default function EditQna({ topic, title, prevContent, prevTitle, onSubmit
value={articleTitle}
onChange={(e) => setArticleTitle(e.target.value)}
/>
{articleTitle.length > 49 && <div className={styles.textLength}>{articleTitle.length} / 50</div>}
{articleTitle.length > 49 && <div className={styles.textLength}>최대 50글자까지 작성할 있습니다.</div>}
</div>
<div className={styles.fieldWrapper}>
<label className={styles.label}>내용</label>
@ -62,7 +62,9 @@ export default function EditQna({ topic, title, prevContent, prevTitle, onSubmit
value={articleContent}
onChange={handleInput}
></textarea>
{articleContent.length > 999 && <div className={styles.textLength}>{articleContent.length} / 1000</div>}
{articleContent.length > 999 && (
<div className={styles.textLength}>최대 1000글자까지 작성할 있습니다.</div>
)}
</div>
<button
type="button"

View File

@ -47,7 +47,7 @@ export default function FreeboardComment({ content, author, onDeleteSubmit, onEd
className={styles.input}
required
/>
{newComment.length > 190 && <div className={styles.textLength}>{newComment.length} / 200</div>}
{newComment.length > 199 && <div className={styles.textLength}>최대 200글자까지 작성할 있습니다.</div>}
<button
type="submit"
className={styles.button}

View File

@ -25,7 +25,7 @@ export default function FreeboardCommentInput({ onCommentSubmit }) {
className={styles.input}
required
/>
{newComment.length > 190 && <div className={styles.textLength}>{newComment.length} / 200</div>}
{newComment.length > 199 && <div className={styles.textLength}>최대 200글자까지 작성할 있습니다.</div>}
<button
type="submit"
className={styles.button}

View File

@ -97,7 +97,7 @@ export default function LectureForm({ title, topic, to = '..', initialValues = {
placeholder="강의명을 입력하세요"
required
/>
{lectureTitle.length > 49 && <div className={styles.textLength}>{lectureTitle.length} / 50</div>}
{lectureTitle.length > 49 && <div className={styles.textLength}>최대 50글자까지 작성할 있습니다.</div>}
</div>
<div className={styles.inputField}>
<label className={styles.label}>설명</label>
@ -108,7 +108,7 @@ export default function LectureForm({ title, topic, to = '..', initialValues = {
maxLength={2000}
placeholder="강의에 대한 설명을 입력하세요"
></textarea>
{description.length > 1999 && <div className={styles.textLength}>{description.length} / 2000</div>}
{description.length > 1999 && <div className={styles.textLength}>최대 2000글자까지 작성할 있습니다.</div>}
</div>
<div className={styles.inputField}>
<label className={styles.label}>강의 계획</label>
@ -119,7 +119,7 @@ export default function LectureForm({ title, topic, to = '..', initialValues = {
maxLength={2000}
placeholder="강의 계획을 입력하세요"
></textarea>
{plan.length > 1999 && <div className={styles.textLength}>{plan.length} / 2000</div>}
{plan.length > 1999 && <div className={styles.textLength}>최대 2000글자까지 작성할 있습니다.</div>}
</div>
<div className={styles.inputField}>
<label className={styles.label}>강의 기간</label>
@ -156,7 +156,7 @@ export default function LectureForm({ title, topic, to = '..', initialValues = {
className={styles.input}
placeholder="실제 강의 진행 시간을 입력하세요"
/>
{time.length > 49 && <div className={styles.textLength}>{time.length} / 50</div>}
{time.length > 49 && <div className={styles.textLength}>최대 50글자까지 작성할 있습니다.</div>}
</div>
{onCreate && (
<div className={styles.inputField}>

View File

@ -35,7 +35,7 @@ export default function PasswordChangeForm({ onSubmit, onError }) {
type="password"
id="currentPassword"
ref={currentPasswordRef}
maxLength={50}
maxLength={200}
className={error === 'currentPwError' ? styles.inputErrorBox : styles.inputBox}
required
/>
@ -47,7 +47,7 @@ export default function PasswordChangeForm({ onSubmit, onError }) {
type="password"
id="newPassword"
ref={newPasswordRef}
maxLength={50}
maxLength={200}
className={error === 'samePwError' ? styles.inputErrorBox : styles.inputBox}
required
/>
@ -59,7 +59,7 @@ export default function PasswordChangeForm({ onSubmit, onError }) {
type="password"
id="confirmPassword"
ref={confirmPasswordRef}
maxLength={50}
maxLength={200}
className={error === 'confirmError' ? styles.inputErrorBox : styles.inputBox}
required
/>