From c9b8f09070756999860f12afb51463a1589c5077 Mon Sep 17 00:00:00 2001 From: juno Date: Mon, 16 Feb 2026 02:46:52 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20Admin=20=EB=A0=88=EC=9D=B4=EC=95=84?= =?UTF-8?q?=EC=9B=83=20=EB=B0=8F=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=EC=BB=B4?= =?UTF-8?q?=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Sidebar, Footer 컴포넌트 제거 및 admin 레이아웃 단순화 - Course/Schedule/User 리스트 폼·테이블 리팩토링 - LandingFooter 삭제 및 Header 관련 컴포넌트 수정 --- web/src/app/(landing)/layout.tsx | 2 - web/src/app/admin/course/page.tsx | 30 ++++++----- web/src/app/admin/layout.tsx | 3 -- web/src/app/admin/page.tsx | 51 ++++++++++--------- web/src/app/admin/schedule/page.tsx | 28 +++++----- web/src/app/admin/user/page.tsx | 22 ++++---- web/src/components/LandingFooter.tsx | 9 ---- web/src/components/admin/Footer.tsx | 9 ---- web/src/components/admin/Header.tsx | 5 +- web/src/components/admin/Sidebar.tsx | 28 ---------- .../admin/course/CourseListForm.tsx | 28 +++++----- .../admin/course/CourseListTable.tsx | 39 +++++++------- .../admin/schedule/ScheduleListForm.tsx | 30 +++++------ .../admin/schedule/ScheduleListTable.tsx | 39 +++++++------- .../components/admin/user/UserListForm.tsx | 37 +++++++------- .../components/admin/user/UserListTable.tsx | 35 +++++++------ web/src/components/common/HeaderUserMenu.tsx | 4 +- web/src/components/study/StudyHeader.tsx | 5 +- web/src/components/teach/TeachHeader.tsx | 5 +- 19 files changed, 184 insertions(+), 225 deletions(-) delete mode 100644 web/src/components/LandingFooter.tsx delete mode 100644 web/src/components/admin/Footer.tsx delete mode 100644 web/src/components/admin/Sidebar.tsx diff --git a/web/src/app/(landing)/layout.tsx b/web/src/app/(landing)/layout.tsx index d43175f..da50f9b 100644 --- a/web/src/app/(landing)/layout.tsx +++ b/web/src/app/(landing)/layout.tsx @@ -1,5 +1,4 @@ import LandingHeader from "@/components/LandingHeader"; -import LandingFooter from "@/components/LandingFooter"; export default function LandingLayout({ children, @@ -10,7 +9,6 @@ export default function LandingLayout({
{children}
-
); } diff --git a/web/src/app/admin/course/page.tsx b/web/src/app/admin/course/page.tsx index b558619..3d085ee 100644 --- a/web/src/app/admin/course/page.tsx +++ b/web/src/app/admin/course/page.tsx @@ -49,23 +49,23 @@ export default function AdminCoursesPage() { }; return ( -
+
-
-
-

+
+
+

강의 관리

-

+

교육 콘텐츠를 검색하고 관리합니다.

@@ -77,7 +77,7 @@ export default function AdminCoursesPage() {

-
+
{isLoading ? ( ) : error ? ( @@ -85,11 +85,13 @@ export default function AdminCoursesPage() { 강의 목록을 불러오는 중 오류가 발생했습니다.

) : courses?.length ? ( - +
+ +
) : (

강의가 없습니다.

)} diff --git a/web/src/app/admin/layout.tsx b/web/src/app/admin/layout.tsx index 6f306b9..8043ea3 100644 --- a/web/src/app/admin/layout.tsx +++ b/web/src/app/admin/layout.tsx @@ -1,13 +1,10 @@ import AdminHeader from "@/components/admin/Header"; -import AdminFooter from "@/components/admin/Footer"; -// export default function AdminLayout({ children }: { children: React.ReactNode }) { return (
{children}
-
); } \ No newline at end of file diff --git a/web/src/app/admin/page.tsx b/web/src/app/admin/page.tsx index 7fa4e20..e450b89 100644 --- a/web/src/app/admin/page.tsx +++ b/web/src/app/admin/page.tsx @@ -6,6 +6,7 @@ import { useScheduleStatusStats } from "@/hooks/admin/useSchedule"; import { useUserRoleStats } from "@/hooks/admin/useUser"; import { ScheduleStatus } from "@/schemas/schedule/schedule-status"; import { UserRole } from "@/schemas/user/user-role"; +import { Button } from "@/components/ui/button"; export default function AdminPage() { const { @@ -26,8 +27,8 @@ export default function AdminPage() { if (isLoading) { return ( -
-

관리자 대시보드

+
+

관리자 대시보드

@@ -38,33 +39,35 @@ export default function AdminPage() { if (isError) { return ( -
-

관리자 대시보드

-
-

+

+

관리자 대시보드

+
+

데이터를 불러오는 중 오류가 발생했습니다.

-

+

잠시 후 다시 시도해주세요.

-
+
{isScheduleStatusError && ( - + )} {isUserRoleError && ( - + )}
@@ -73,32 +76,32 @@ export default function AdminPage() { } return ( -
-

관리자 대시보드

+
+

관리자 대시보드

{/* 사용자 통계 */} {userRoleStats ? ( -
-

사용자 통계

+
+

사용자 통계

stats={userRoleStats} unit="명" />
) : ( -
-

사용자 통계

+
+

사용자 통계

데이터를 불러올 수 없습니다.

)} {/* 스케줄 통계 */} {scheduleStatusStats ? ( -
-

스케줄 통계

+
+

스케줄 통계

stats={scheduleStatusStats} unit="건" />
) : ( -
-

스케줄 통계

+
+

스케줄 통계

데이터를 불러올 수 없습니다.

)} diff --git a/web/src/app/admin/schedule/page.tsx b/web/src/app/admin/schedule/page.tsx index cabdac6..e94f250 100644 --- a/web/src/app/admin/schedule/page.tsx +++ b/web/src/app/admin/schedule/page.tsx @@ -39,23 +39,23 @@ export default function AdminSchedulesPage() { }; return ( -
+
-
-
-

+
+
+

스케줄 관리

-

+

사용자 스케줄을 검색하고 관리합니다.

@@ -63,7 +63,7 @@ export default function AdminSchedulesPage() {

-
+
{isLoading ? ( ) : error ? ( @@ -71,10 +71,12 @@ export default function AdminSchedulesPage() { 스케줄 목록을 불러오는 중 오류가 발생했습니다.

) : schedules?.length ? ( - +
+ +
) : (

스케줄이 없습니다.

)} diff --git a/web/src/app/admin/user/page.tsx b/web/src/app/admin/user/page.tsx index 940b348..a3c02bc 100644 --- a/web/src/app/admin/user/page.tsx +++ b/web/src/app/admin/user/page.tsx @@ -39,23 +39,23 @@ export default function AdminUsersPage() { }; return ( -
+
-
-
-

+
+
+

사용자 관리

-

+

서비스 사용자를 검색하고 관리합니다.

@@ -63,7 +63,7 @@ export default function AdminUsersPage() {

-
+
{isLoading ? ( ) : error ? ( @@ -71,7 +71,9 @@ export default function AdminUsersPage() { 사용자 목록을 불러오는 중 오류가 발생했습니다.

) : users?.length ? ( - +
+ +
) : (

사용자가 없습니다.

)} diff --git a/web/src/components/LandingFooter.tsx b/web/src/components/LandingFooter.tsx deleted file mode 100644 index 59b72d3..0000000 --- a/web/src/components/LandingFooter.tsx +++ /dev/null @@ -1,9 +0,0 @@ -export default function LandingFooter() { - return ( -
-
- © 2024 NexLang. All rights reserved. -
-
- ); -} diff --git a/web/src/components/admin/Footer.tsx b/web/src/components/admin/Footer.tsx deleted file mode 100644 index d08289e..0000000 --- a/web/src/components/admin/Footer.tsx +++ /dev/null @@ -1,9 +0,0 @@ -export default function AdminFooter() { - return ( -
-
- © 2024 NexLang. All rights reserved. -
-
- ); -} \ No newline at end of file diff --git a/web/src/components/admin/Header.tsx b/web/src/components/admin/Header.tsx index fddc4e5..3fddf11 100644 --- a/web/src/components/admin/Header.tsx +++ b/web/src/components/admin/Header.tsx @@ -26,10 +26,7 @@ export default function AdminHeader() {
- +

NexLang

diff --git a/web/src/components/admin/Sidebar.tsx b/web/src/components/admin/Sidebar.tsx deleted file mode 100644 index 93e617c..0000000 --- a/web/src/components/admin/Sidebar.tsx +++ /dev/null @@ -1,28 +0,0 @@ -export default function AdminSidebar() { - return ( - - ); -} \ No newline at end of file diff --git a/web/src/components/admin/course/CourseListForm.tsx b/web/src/components/admin/course/CourseListForm.tsx index a46c841..c880d9d 100644 --- a/web/src/components/admin/course/CourseListForm.tsx +++ b/web/src/components/admin/course/CourseListForm.tsx @@ -42,29 +42,29 @@ export default function CourseListForm({ onSubmit }: CourseListFormProps) { return (
-
-