diff --git a/app/admin_home/page.tsx b/app/admin_home/page.tsx index 00891cb..5ad6d83 100644 --- a/app/admin_home/page.tsx +++ b/app/admin_home/page.tsx @@ -266,7 +266,14 @@ export default function AdminHomePage() { {/* 로그아웃 */} -
+ -
+
+

+ 로그아웃 +

+
+ {/* 메인 콘텐츠 */} diff --git a/app/admin_lecture1/page.tsx b/app/admin_lecture1/page.tsx index ee2e16f..25f3004 100644 --- a/app/admin_lecture1/page.tsx +++ b/app/admin_lecture1/page.tsx @@ -349,7 +349,14 @@ export default function AdminLecture1Page() { {/* 로그아웃 */} -
+ -
+
+

+ 로그아웃 +

+
+ {/* 메인 콘텐츠 */} diff --git a/app/admin_lecture2/page.tsx b/app/admin_lecture2/page.tsx index eed8cc7..f2de6d7 100644 --- a/app/admin_lecture2/page.tsx +++ b/app/admin_lecture2/page.tsx @@ -263,7 +263,14 @@ export default function AdminLecture2Page() { {/* 로그아웃 */} -
+ -
+
+

+ 로그아웃 +

+
+ {/* 메인 콘텐츠 */} diff --git a/app/page.tsx b/app/page.tsx index 5cefb04..2233db6 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -6,7 +6,6 @@ import Image from 'next/image'; import { isAdminLoggedIn } from '../lib/auth'; import LoginPage from './login/page'; import Header from './components/Header'; -import Logout from '../public/svg/logout'; const imgImage2 = "http://localhost:3845/assets/89fda8e949171025b1232bae70fc9d442e4e70c8.png"; const imgImage7 = "http://localhost:3845/assets/a4e4d09643b890b56084560cc24d6e532a03487b.png"; @@ -21,7 +20,6 @@ export default function HomePage() { const [isAdmin, setIsAdmin] = useState(false); const [isLoading, setIsLoading] = useState(true); const [currentHeroSlide, setCurrentHeroSlide] = useState(0); - const [selectedTab, setSelectedTab] = useState<'전체' | '학습자' | '강사' | '운영자'>('전체'); // 임시 데이터 - 실제로는 API에서 가져올 데이터 const [courses, setCourses] = useState([ @@ -61,7 +59,12 @@ export default function HomePage() { setIsLoggedIn(loginStatus); setIsAdmin(adminStatus); setIsLoading(false); - }, []); + + // 관리자일 경우 admin_home 페이지로 리다이렉트 + if (adminStatus) { + router.push('/admin_home'); + } + }, [router]); if (isLoading) { return null; // 로딩 중 @@ -72,222 +75,9 @@ export default function HomePage() { return ; } - // 관리자일 경우 권한 설정 페이지 표시 + // 관리자일 경우 리다이렉트 중 if (isAdmin) { - return ( -
- {/* 사이드바 */} -
- {/* 로고 */} - - {/* 메뉴 */} -
-
- - - - - - - - - -
-
- {/* 로그아웃 */} -
-
-
-
- -
-
-
- -
-
- - {/* 메인 콘텐츠 */} -
- {/* 페이지 타이틀 탭 */} -
- - - - -
- - {/* 사용자 목록 테이블 */} -
- {/* 테이블 헤더 */} -
-
-
-
-

가입일

-
-
-
-
-

사용자명

-
-
-
-
-

아이디(이메일)

-
-
-
-
-

권한

-
-
-
-
-

계정 상태

-
-
-
-
-

계정 관리

-
-
-
-
- - {/* 빈 상태 메시지 */} -
-
-
-

- 존재하는 계정이 없어요. -

-
-
-
-
-
-
- ); + return null; } // 일반 사용자일 경우 기존 메인 페이지 표시