fix: 강의제목 / 글(게시판) 제목 / 퀴즈셋 제목 50자 제한 적용

This commit is contained in:
정기영 2024-08-13 09:18:21 +09:00
parent aadd028a46
commit 630bf89451
3 changed files with 6 additions and 6 deletions

View File

@ -45,13 +45,13 @@ export default function CreateArticle({ topic, title, onSubmit }) {
<label className={styles.label}>제목</label> <label className={styles.label}>제목</label>
<input <input
type="text" type="text"
maxLength={200} maxLength={50}
className={styles.titleInput} className={styles.titleInput}
placeholder="제목을 입력하세요" placeholder="제목을 입력하세요"
value={articleTitle} value={articleTitle}
onChange={(e) => setArticleTitle(e.target.value)} onChange={(e) => setArticleTitle(e.target.value)}
/> />
{articleTitle.length > 190 && <div className={styles.textLength}>{articleTitle.length} / 200</div>} {articleTitle.length > 49 && <div className={styles.textLength}>{articleTitle.length} / 50</div>}
</div> </div>
<div className={styles.fieldWrapper}> <div className={styles.fieldWrapper}>
<label className={styles.label}>내용</label> <label className={styles.label}>내용</label>
@ -64,7 +64,7 @@ export default function CreateArticle({ topic, title, onSubmit }) {
onChange={handleInput} onChange={handleInput}
style={{ overflow: 'hidden' }} style={{ overflow: 'hidden' }}
></textarea> ></textarea>
{articleContent.length > 950 && <div className={styles.textLength}>{articleContent.length} / 1000</div>} {articleContent.length > 999 && <div className={styles.textLength}>{articleContent.length} / 1000</div>}
</div> </div>
<button <button
type="button" type="button"

View File

@ -81,7 +81,7 @@ export default function LectureForm({ title, topic, to = '..', initialValues = {
<input <input
className={styles.input} className={styles.input}
ref={titleRef} ref={titleRef}
maxLength={200} maxLength={50}
type="text" type="text"
placeholder="강의명을 입력하세요" placeholder="강의명을 입력하세요"
/> />
@ -128,7 +128,7 @@ export default function LectureForm({ title, topic, to = '..', initialValues = {
<input <input
type="text" type="text"
ref={timeRef} ref={timeRef}
maxLength={200} maxLength={50}
className={styles.input} className={styles.input}
placeholder="실제 강의 진행 시간을 입력하세요" placeholder="실제 강의 진행 시간을 입력하세요"
/> />

View File

@ -53,7 +53,7 @@ export default function QuizsetForm({ headerTitle, topic, to, onSubmit, initialV
<input <input
className={styles.input} className={styles.input}
type="text" type="text"
maxLength={200} maxLength={50}
value={title} value={title}
onChange={(e) => setTitle(e.target.value)} onChange={(e) => setTitle(e.target.value)}
placeholder="퀴즈셋 제목을 입력해주세요" placeholder="퀴즈셋 제목을 입력해주세요"