From 5bd58036bf2dd6cace089a5a5b3301cefabc6024 Mon Sep 17 00:00:00 2001 From: kdhye1119 Date: Thu, 18 Jun 2026 12:32:29 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[feat]=20=EC=A7=88=EB=AC=B8=20=EB=94=94?= =?UTF-8?q?=ED=85=8C=EC=9D=BC=20=ED=83=AD=EC=97=90=EC=84=9C=20=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=EC=9C=BC=EB=A1=9C=20=EB=B2=84=ED=8A=BC=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/curriculum/CurriculumPage.js | 60 +++++++++---------- frontend/src/pages/qna/QnADetailPage.js | 20 ++++++- .../src/pages/qna/QnADetailPage.module.css | 32 ++++++++++ frontend/src/pages/qna/QnAMainPage.js | 2 +- 4 files changed, 80 insertions(+), 34 deletions(-) diff --git a/frontend/src/pages/curriculum/CurriculumPage.js b/frontend/src/pages/curriculum/CurriculumPage.js index e65f1ce..6375a2f 100644 --- a/frontend/src/pages/curriculum/CurriculumPage.js +++ b/frontend/src/pages/curriculum/CurriculumPage.js @@ -67,7 +67,7 @@ function MemberSessionCard({ day }) { toggle -
+
{isOpen && (
@@ -104,7 +104,7 @@ function AdminSessionCard({ day, onEdit, onDelete }) {
toggle -
+
{isOpen && (
@@ -161,7 +161,7 @@ function SessionForm({ day, week, onClose, onSave }) { const date = new Date(year, month - 1, day); const map = { 2: '화요일', 4: '목요일', 6: '토요일' }; return map[date.getDay()] || ''; - }; + }; const handleSave = async () => { const body = { @@ -219,27 +219,27 @@ function SessionForm({ day, week, onClose, onSave }) { return (
-
- - -
- -
-
- - -
-
- - setForm({ ...form, sessionDate: e.target.value })} /> -
-
+
+ + +
+ +
+
+ + +
+
+ + setForm({ ...form, sessionDate: e.target.value })} /> +
+
{/* 오전 세션 */}
@@ -290,8 +290,8 @@ function SessionForm({ day, week, onClose, onSave }) { {/* 과제 */}
과제 -
setForm({ ...form, assignmentName: e.target.value })} />
-
setForm({ ...form, assignmentUrl: e.target.value })} />
+
setForm({ ...form, assignmentName: e.target.value })} />
+
setForm({ ...form, assignmentUrl: e.target.value })} />
@@ -313,7 +313,7 @@ function CurriculumPage() { const res = await authFetch('/api/curriculums'); const data = await res.json(); setDays(Array.isArray(data) ? data : []); - } catch (e) {} + } catch (e) { } }; useEffect(() => { fetchDays(); }, []); @@ -347,7 +347,7 @@ function CurriculumPage() { 세션 생성
- )} + )} {Object.entries(grouped).map(([week, weekDays]) => (
@@ -370,8 +370,8 @@ function CurriculumPage() { ))} {showForm && ( - - { setShowForm(false); setEditDay(null); setCreateWeek(null); }} diff --git a/frontend/src/pages/qna/QnADetailPage.js b/frontend/src/pages/qna/QnADetailPage.js index d5c8d23..7e27f72 100644 --- a/frontend/src/pages/qna/QnADetailPage.js +++ b/frontend/src/pages/qna/QnADetailPage.js @@ -2,7 +2,7 @@ import '../../assets/styles/global.css'; import { useState, useEffect, useRef } from 'react'; import { useParams, useNavigate } from 'react-router-dom'; import styles from './QnADetailPage.module.css'; -import { FiMoreVertical, FiCornerDownRight } from 'react-icons/fi'; +import { FiMoreVertical, FiCornerDownRight, FiChevronLeft } from 'react-icons/fi'; import { CommentImoji, MeCuriousToo, @@ -25,7 +25,7 @@ const formatTime = (dateStr) => { }; function QnADetailPage() { - const { questionId } = useParams(); + const { sessionId, questionId } = useParams(); const navigate = useNavigate(); const isStaff = localStorage.getItem('role') === 'ADMIN'; @@ -53,7 +53,7 @@ function QnADetailPage() { // ── 질문 불러오기 ──────────────────────────────── useEffect(() => { document.title = "Q&A | PIROIN"; - + const fetchQuestion = async () => { try { setLoading(true); @@ -112,6 +112,11 @@ function QnADetailPage() { return () => document.removeEventListener('click', handleClickOutside); }, [showMenu, commentMenuId]); + // ── 목록으로 가기 ──────────────────────────────── + const handleBackToList = () => { + navigate(`/sessions/${sessionId}/questions/`); + }; + // ── 좋아요 토글 ────────────────────────────────── const toggleLike = async () => { try { @@ -302,6 +307,15 @@ function QnADetailPage() { return (
+ {/* ── 목록으로 가기 ── */} + + {/* ── 작성자 행 ── */}
diff --git a/frontend/src/pages/qna/QnADetailPage.module.css b/frontend/src/pages/qna/QnADetailPage.module.css index 0e4fd83..c9e2297 100644 --- a/frontend/src/pages/qna/QnADetailPage.module.css +++ b/frontend/src/pages/qna/QnADetailPage.module.css @@ -12,6 +12,32 @@ box-shadow: 2px 2px 5px 0 rgba(0, 0, 0, 0.25); } +/* ── 목록으로 가기 ── */ +.backToListBtn { + display: flex; + align-items: center; + gap: 4px; + background: none; + border: none; + cursor: pointer; + font-family: var(--font-main); + font-size: 14px; + font-weight: 500; + color: var(--gray600); + padding: 0; + margin: 0 0 18px; + align-self: flex-start; + transition: color 0.15s; +} + +.backToListBtn:hover { + color: var(--black); +} + +.backToListBtn svg { + flex-shrink: 0; +} + /* ── 작성자 행 ── */ .authorRow { display: flex; @@ -561,6 +587,12 @@ border-radius: 16px 16px 0 0; } + /* ── 목록으로 가기 ── */ + .backToListBtn { + font-size: 13px; + margin-bottom: 14px; + } + /* ── 질문 본문 ── */ .qIcon { font-size: 28px; diff --git a/frontend/src/pages/qna/QnAMainPage.js b/frontend/src/pages/qna/QnAMainPage.js index 15c039e..892a3ee 100644 --- a/frontend/src/pages/qna/QnAMainPage.js +++ b/frontend/src/pages/qna/QnAMainPage.js @@ -18,7 +18,7 @@ function QNAMainPage() { // ── 세션 목록 불러오기 ────────────────────────── useEffect(() => { document.title = "Q&A | PIROIN"; - + const fetchSessions = async () => { try { setLoading(true); From 0e5db132a054890cdf7d86fac2a19762784bf94a Mon Sep 17 00:00:00 2001 From: kdhye1119 Date: Thu, 18 Jun 2026 12:35:23 +0900 Subject: [PATCH 2/3] =?UTF-8?q?[feat]=20QnA=20->=20=ED=98=84=EC=9E=AC=20?= =?UTF-8?q?=EC=84=B8=EC=85=98=20=EC=9C=BC=EB=A1=9C=20=EC=9D=B4=EB=A6=84=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/qna/QnAMainPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/qna/QnAMainPage.js b/frontend/src/pages/qna/QnAMainPage.js index 892a3ee..f799420 100644 --- a/frontend/src/pages/qna/QnAMainPage.js +++ b/frontend/src/pages/qna/QnAMainPage.js @@ -50,7 +50,7 @@ function QNAMainPage() { {activeSessions.length > 0 && ( <>
-

Q&A

+

현재 세션

{activeSessions.map(session => (
Date: Thu, 18 Jun 2026 12:47:23 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[feat]=20=EC=9D=B4=ED=95=B4=EB=8F=84=20?= =?UTF-8?q?=EC=B2=B4=ED=81=AC=20=EC=98=AC=EB=A6=AC=EA=B8=B0=20=EC=A0=84?= =?UTF-8?q?=EC=97=90=EB=8A=94=20=EC=9D=B4=ED=95=B4=EB=8F=84=20=EB=B0=94=20?= =?UTF-8?q?=EC=95=88=EB=9C=A8=EA=B2=8C=20=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/qna/QnAListPage.js | 68 ++++++++++++++------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/frontend/src/pages/qna/QnAListPage.js b/frontend/src/pages/qna/QnAListPage.js index 635d97c..ae65ef6 100644 --- a/frontend/src/pages/qna/QnAListPage.js +++ b/frontend/src/pages/qna/QnAListPage.js @@ -379,40 +379,42 @@ function QnAListPage() {

- {/* ── 이해도 바 ── */} -
- - - {understanding?.current?.content ?? '이해도 없음'} - - ({understanding?.current?.respondedCount ?? 0}/ - {understanding?.current?.attendanceCount ?? 0}) + {/* ── 이해도 바 (이해도 체크가 없으면 숨김) ── */} + {understanding?.current?.checkId != null && ( +
+ + + {understanding.current.content} + + ({understanding.current.respondedCount ?? 0}/ + {understanding.current.attendanceCount ?? 0}) + - - - - -
+ + + +
+ )} {/* ── 질문 목록 ── */}