Skip to content
Merged
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: 4 additions & 4 deletions frontend/src/pages/curriculum/CurriculumPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,18 +318,18 @@ function SessionForm({ day, week, onClose, onSave }) {

// ── 메인 컴포넌트 ─────────────────────────────────────
function CurriculumPage() {
const [role, setRole] = useState(localStorage.getItem('role') || 'MEMBER');
const [role, setRole] = useState(null);
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);
setRole(localStorage.getItem('role') || 'MEMBER');
}, []);

// if (role === null) return null;

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