From 28860eca8a3176a1998935cabc771bd99b7aa44c Mon Sep 17 00:00:00 2001 From: plumbestie Date: Sat, 11 Jul 2026 14:54:34 +0900 Subject: [PATCH 1/4] =?UTF-8?q?[Fix]=20QnA=20List=20=EB=8C=93=EA=B8=80=20?= =?UTF-8?q?=EA=B8=80=EC=9E=90=20=EB=9B=B0=EC=B3=90=EB=82=98=EA=B0=80?= =?UTF-8?q?=EB=8A=94=20=EA=B1=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/qna/QnAListPage.js | 3 ++- frontend/src/pages/qna/QnAListPage.module.css | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/qna/QnAListPage.js b/frontend/src/pages/qna/QnAListPage.js index 47cfe62..7ca7fbf 100644 --- a/frontend/src/pages/qna/QnAListPage.js +++ b/frontend/src/pages/qna/QnAListPage.js @@ -842,7 +842,8 @@ function QnAListPage() {
- {comment.content} + + {comment.content}
{comment.hasImage && (
Date: Sat, 11 Jul 2026 14:58:47 +0900 Subject: [PATCH 2/4] =?UTF-8?q?[Fix]=20QnA=20=EC=84=B8=EB=B6=80=20?= =?UTF-8?q?=EB=94=94=EC=9E=90=EC=9D=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/qna/QnAListPage.module.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/pages/qna/QnAListPage.module.css b/frontend/src/pages/qna/QnAListPage.module.css index e8165e3..37118b4 100644 --- a/frontend/src/pages/qna/QnAListPage.module.css +++ b/frontend/src/pages/qna/QnAListPage.module.css @@ -63,9 +63,9 @@ } .scopeTabActive { - background: var(--main); - color: var(--black); - font-weight: 700; + background: var(--dark); + color: var(--white); + font-weight: 650; } .filterControls { @@ -319,7 +319,7 @@ .qIcon { flex-shrink: 0; padding-top: 1px; - color: var(--main); + color: var(--dark); font-family: var(--font-main); font-size: 36px; font-weight: 900; @@ -358,7 +358,7 @@ color: var(--white); font-family: var(--font-main); font-size: 12px; - font-weight: 700; + font-weight: 650; letter-spacing: 0; } From 61bd462d56bce0749e5ff9c833a8ff49d0b64636 Mon Sep 17 00:00:00 2001 From: plumbestie Date: Sat, 11 Jul 2026 16:08:59 +0900 Subject: [PATCH 3/4] =?UTF-8?q?[Fix]=20=EC=9E=85=EB=A0=A5=EC=B0=BD=20?= =?UTF-8?q?=EC=9E=85=EB=A0=A5=20=EA=B8=B8=EC=9D=B4=EC=97=90=20=EB=94=B0?= =?UTF-8?q?=EB=A5=B8=20=20=EC=9E=90=EB=8F=99=20=EC=A4=84=EB=B0=94=EA=BF=88?= =?UTF-8?q?=20=EB=B0=8F=20textarea=20=EB=84=93=EC=9D=B4=20=EC=A1=B0?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/qna/QnADetailPage.js | 19 +++++-- .../src/pages/qna/QnADetailPage.module.css | 12 ++++- frontend/src/pages/qna/QnAListPage.js | 38 +++++++++++--- frontend/src/pages/qna/QnAListPage.module.css | 49 ++++++++++++++----- 4 files changed, 95 insertions(+), 23 deletions(-) diff --git a/frontend/src/pages/qna/QnADetailPage.js b/frontend/src/pages/qna/QnADetailPage.js index f2b3a9f..bef7cfb 100644 --- a/frontend/src/pages/qna/QnADetailPage.js +++ b/frontend/src/pages/qna/QnADetailPage.js @@ -92,6 +92,7 @@ function QnADetailPage() { const [selectedImages, setSelectedImages] = useState([]); // 여러 장 const [imagePreviews, setImagePreviews] = useState([]); // 여러 장 미리보기 const fileInputRef = useRef(null); + const commentTextareaRef = useRef(null); // ── 댓글 수정 상태 ─────────────────────────────── const [commentMenuId, setCommentMenuId] = useState(null); @@ -420,6 +421,7 @@ function QnADetailPage() { setImagePreviews([]); // 로컬 상태에 blob URL을 직접 넣으면 새로고침 시 이미지가 깨지므로 // 등록 직후 fetchQuestion으로 서버의 정식 URL을 받아온다. + if (commentTextareaRef.current) commentTextareaRef.current.style.height = 'auto'; await fetchQuestion(); } } catch (err) { @@ -709,14 +711,25 @@ function QnADetailPage() { style={{ display: 'none' }} onChange={handleImageSelect} /> - setCommentText(e.target.value)} - onKeyDown={e => { if (e.key === 'Enter' && !e.nativeEvent.isComposing) handleCommentSubmit(); }} + onChange={e => { + setCommentText(e.target.value); + e.target.style.height = 'auto'; + e.target.style.height = `${Math.min(e.target.scrollHeight, 150)}px`; + }} + onKeyDown={e => { + if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) { + e.preventDefault(); + handleCommentSubmit(); + } + }} onPaste={handlePaste} + rows={1} disabled={isSubmitting} /> - { commentTextareaRefs.current[question.questionId] = el; }} className={styles.commentInput} placeholder="댓글을 입력해주세요..." value={commentInputs[question.questionId] || ''} - onChange={e => handleCommentChange(question.questionId, e.target.value)} - onKeyDown={e => { if (e.key === 'Enter' && !e.nativeEvent.isComposing) handleCommentSubmit(e, question.questionId); }} + onChange={e => { + handleCommentChange(question.questionId, e.target.value); + e.target.style.height = 'auto'; + e.target.style.height = `${Math.min(e.target.scrollHeight, 120)}px`; + }} + onKeyDown={e => { + if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) { + e.preventDefault(); + handleCommentSubmit(e, question.questionId); + } + }} onPaste={e => handleCommentPaste(e, question.questionId)} + rows={1} autoFocus />