Skip to content

Commit aadb219

Browse files
authored
fix: AdminPage 미정의 컴포넌트로 인한 탭 크래시 수정
1 parent 9966586 commit aadb219

1 file changed

Lines changed: 41 additions & 3 deletions

File tree

src/pages/admin/AdminPage.jsx

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ export default function AdminPage() {
194194
{activeMenu === 'dashboard' && <DashboardPanel data={dashboardData} loading={dashboardLoading} onMenuChange={setActiveMenu} />}
195195
{activeMenu === 'teacher-approval' && <TeacherApprovalPanel />}
196196
{activeMenu === 'report' && <PlaceholderPanel title="신고 접수 처리" icon="🚨" desc="사용자로부터 접수된 신고를 검토하고 제재 조치를 취합니다." />}
197-
{activeMenu === 'members' && <MembersPanel />}
198-
{activeMenu === 'inquiry' && <PlaceholderPanel title="일반 문의 답변" />}
197+
{activeMenu === 'members' && <UserManagementPanel />}
198+
{activeMenu === 'inquiry' && <PlaceholderPanel title="일반 문의 답변" icon="✉️" desc="사용자로부터 접수된 문의를 확인하고 답변합니다." />}
199199
{activeMenu === 'login-history' && <LoginHistoryPanel />}
200200
{activeMenu === 'payment-history' && <PaymentHistoryPanel />}
201201
{activeMenu === 'withdrawal-history' && <WithdrawalHistoryPanel />}
@@ -1308,7 +1308,6 @@ function UserDetailModal({ userId, onClose }) {
13081308
)
13091309
}
13101310

1311-
/**
13121311
/** 결제/마일리지 전체 내역 조회 패널 */
13131312
function PaymentHistoryPanel() {
13141313
const [items, setItems] = useState([])
@@ -1660,3 +1659,42 @@ function WithdrawalHistoryPanel() {
16601659
</div>
16611660
)
16621661
}
1662+
1663+
function Pagination({ page, totalPages, onPageChange }) {
1664+
if (totalPages <= 1) return null
1665+
return (
1666+
<div className="admin-pagination">
1667+
<button className="admin-page-btn" disabled={page === 0} onClick={() => onPageChange(page - 1)}>이전</button>
1668+
<span className="admin-page-info">{page + 1} / {totalPages}</span>
1669+
<button className="admin-page-btn" disabled={page === totalPages - 1} onClick={() => onPageChange(page + 1)}>다음</button>
1670+
</div>
1671+
)
1672+
}
1673+
1674+
function PlaceholderPanel({ title, icon = '🚧', desc }) {
1675+
return (
1676+
<div className="admin-content-inner">
1677+
<div className="admin-content-header">
1678+
<h2 className="admin-content-title">{icon} {title}</h2>
1679+
{desc && <p className="admin-content-desc">{desc}</p>}
1680+
</div>
1681+
<div style={{ textAlign: 'center', padding: '80px 24px', color: '#94a3b8' }}>
1682+
<div style={{ fontSize: '3rem', marginBottom: '16px' }}>{icon}</div>
1683+
<p style={{ fontSize: '1.1rem', fontWeight: 600, marginBottom: '8px' }}>준비 중입니다</p>
1684+
<p style={{ fontSize: '0.9rem' }}>해당 기능은 현재 준비 중이에요.</p>
1685+
</div>
1686+
</div>
1687+
)
1688+
}
1689+
1690+
function LoginHistoryPanel() {
1691+
return (
1692+
<div className="admin-content-inner">
1693+
<div className="admin-content-header">
1694+
<h2 className="admin-content-title">🕒 로그인 기록</h2>
1695+
<p className="admin-content-desc">전체 사용자의 로그인/로그아웃 이력을 확인합니다.</p>
1696+
</div>
1697+
<LoginHistoryView variant="admin" />
1698+
</div>
1699+
)
1700+
}

0 commit comments

Comments
 (0)