diff --git a/frontend/src/pages/curriculum/CurriculumPage.js b/frontend/src/pages/curriculum/CurriculumPage.js index 79a15a1..5468022 100644 --- a/frontend/src/pages/curriculum/CurriculumPage.js +++ b/frontend/src/pages/curriculum/CurriculumPage.js @@ -73,7 +73,7 @@ function MemberSessionCard({ day }) { toggle -
+
{isOpen && (
@@ -110,7 +110,7 @@ function AdminSessionCard({ day, onEdit, onDelete }) {
toggle -
+
{isOpen && (
@@ -168,7 +168,7 @@ function SessionForm({ day, week, onClose, onSave }) { const date = new Date(year, month - 1, day); const map = { 0: '일요일', 1: '월요일', 2: '화요일', 3: '수요일', 4: '목요일', 5: '금요일', 6: '토요일' }; return map[date.getDay()] || ''; - }; + }; const handleSave = async () => { const newErrors = {}; @@ -233,6 +233,7 @@ function SessionForm({ day, week, onClose, onSave }) { return (
+
setForm({ ...form, assignmentName: e.target.value })} />
-
setForm({ ...form, assignmentUrl: e.target.value })} />
+
setForm({ ...form, assignmentName: e.target.value })} />
+
setForm({ ...form, assignmentUrl: e.target.value })} />
@@ -330,7 +332,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(); }, []); @@ -364,7 +366,7 @@ function CurriculumPage() { 세션 생성
- )} + )} {Object.entries(grouped).map(([week, weekDays]) => (
@@ -387,8 +389,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 e965efb..52d2e1e 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, useCallback } 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, @@ -97,6 +97,7 @@ function QnADetailPage() { const [editingCommentId, setEditingCommentId] = useState(null); const [editCommentText, setEditCommentText] = useState(''); + const fetchQuestion = useCallback(async ({ showLoading = false } = {}) => { try { if (showLoading) { @@ -194,6 +195,11 @@ function QnADetailPage() { return () => document.removeEventListener('click', handleClickOutside); }, [showMenu, commentMenuId]); + // ── 목록으로 가기 ──────────────────────────────── + const handleBackToList = () => { + navigate(`/sessions/${sessionId}/questions/`); + }; + // ── 좋아요 토글 ────────────────────────────────── const toggleLike = async () => { try { @@ -458,6 +464,15 @@ function QnADetailPage() { return (
+ {/* ── 목록으로 가기 ── */} + + {/* ── 작성자 행 ── */}
diff --git a/frontend/src/pages/qna/QnADetailPage.module.css b/frontend/src/pages/qna/QnADetailPage.module.css index fb45f05..c1e4091 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; @@ -587,6 +613,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/QnAListPage.js b/frontend/src/pages/qna/QnAListPage.js index a6f56a5..3f56a65 100644 --- a/frontend/src/pages/qna/QnAListPage.js +++ b/frontend/src/pages/qna/QnAListPage.js @@ -733,40 +733,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}) + - - - - -
+ + + +
+ )} {/* ── 질문 목록 ── */}
diff --git a/frontend/src/pages/qna/QnAMainPage.js b/frontend/src/pages/qna/QnAMainPage.js index 15c039e..f799420 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); @@ -50,7 +50,7 @@ function QNAMainPage() { {activeSessions.length > 0 && ( <>
-

Q&A

+

현재 세션

{activeSessions.map(session => (