Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions frontend/src/pages/curriculum/CurriculumPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,18 +318,12 @@ function SessionForm({ day, week, onClose, onSave }) {

// ── 메인 컴포넌트 ─────────────────────────────────────
function CurriculumPage() {
const [role, setRole] = useState(localStorage.getItem('role') || 'MEMBER');
const role = localStorage.getItem('role') || 'MEMBER';
const [days, setDays] = useState([]);
const [showForm, setShowForm] = useState(false);
const [editDay, setEditDay] = useState(null);
const [createWeek, setCreateWeek] = useState(null);

useEffect(() => {
const handleStorage = () => setRole(localStorage.getItem('role') || 'MEMBER');
window.addEventListener('storage', handleStorage);
return () => window.removeEventListener('storage', handleStorage);
}, []);

const fetchDays = async () => {
try {
const res = await authFetch('/api/curriculums');
Expand Down
Loading