feat: 퀴즈, 채팅 인풋 최대 길이 설정

This commit is contained in:
jhynsoo 2024-08-14 09:18:39 +09:00
parent 5555121f61
commit 9a0aabe601
3 changed files with 4 additions and 2 deletions

View File

@ -115,6 +115,7 @@ export default function ChatRoom({ isTeacher, ...props }) {
<input <input
className="lk-form-control lk-chat-form-input" className="lk-form-control lk-chat-form-input"
disabled={isSending} disabled={isSending}
maxLength={200}
ref={chatInputRef} ref={chatInputRef}
type="text" type="text"
placeholder="메시지" placeholder="메시지"

View File

@ -36,6 +36,7 @@ export default function Quiz({ question, image, choices = [], setAnswers }) {
<input <input
type="text" type="text"
autoFocus autoFocus
maxLength={50}
placeholder="답 입력" placeholder="답 입력"
onChange={(e) => { onChange={(e) => {
setAnswers(e.target.value); setAnswers(e.target.value);

View File

@ -168,7 +168,7 @@ export default function QuizCard({ quiz, updateQuiz, deleteQuiz }) {
<input <input
className={`${styles.input} ${styles.choiceInput}`} className={`${styles.input} ${styles.choiceInput}`}
type="text" type="text"
maxLength={200} maxLength={50}
value={choice.content} value={choice.content}
onChange={(e) => handleChoiceChange(choice.num, e.target.value)} onChange={(e) => handleChoiceChange(choice.num, e.target.value)}
placeholder={`보기 ${choice.num}`} placeholder={`보기 ${choice.num}`}
@ -196,7 +196,7 @@ export default function QuizCard({ quiz, updateQuiz, deleteQuiz }) {
<input <input
type="text" type="text"
value={answer} value={answer}
maxLength={200} maxLength={50}
onChange={(e) => { onChange={(e) => {
setAnswer(e.target.value); setAnswer(e.target.value);
updateQuiz(quiz.id, { ...quiz, question, answer: e.target.value, choices, image }); updateQuiz(quiz.id, { ...quiz, question, answer: e.target.value, choices, image });