@@ -6,6 +6,7 @@ import { useScheduleStatusStats } from "@/hooks/admin/useSchedule";
66import { useUserRoleStats } from "@/hooks/admin/useUser" ;
77import { ScheduleStatus } from "@/schemas/schedule/schedule-status" ;
88import { UserRole } from "@/schemas/user/user-role" ;
9+ import { Button } from "@/components/ui/button" ;
910
1011export default function AdminPage ( ) {
1112 const {
@@ -26,8 +27,8 @@ export default function AdminPage() {
2627
2728 if ( isLoading ) {
2829 return (
29- < div className = "container mx-auto py-8 px-4 max-w-4xl " >
30- < h1 className = "text-2xl font-bold text-foreground mb-6 " > 관리자 대시보드</ h1 >
30+ < div className = "mx-auto w-full max-w-4xl px-4 py-8 sm:px-6 lg:px-8 " >
31+ < h1 className = "mb-6 text-2xl font-bold text-foreground sm:text-3xl " > 관리자 대시보드</ h1 >
3132 < div className = "flex flex-col gap-6" >
3233 < StatsListSkeleton />
3334 < StatsListSkeleton />
@@ -38,33 +39,35 @@ export default function AdminPage() {
3839
3940 if ( isError ) {
4041 return (
41- < div className = "container mx-auto py-8 px-4 max-w-4xl " >
42- < h1 className = "text-2xl font-bold text-foreground mb-6 " > 관리자 대시보드</ h1 >
43- < div className = "rounded-lg border border-muted-foreground/30 bg-muted/30 p-6" >
44- < p className = "text-foreground font-medium mb-2 " >
42+ < div className = "mx-auto w-full max-w-4xl px-4 py-8 sm:px-6 lg:px-8 " >
43+ < h1 className = "mb-6 text-2xl font-bold text-foreground sm:text-3xl " > 관리자 대시보드</ h1 >
44+ < div className = "rounded-lg border border-muted-foreground/30 bg-muted/30 p-4 sm:p- 6" >
45+ < p className = "mb-2 font-medium text-foreground " >
4546 데이터를 불러오는 중 오류가 발생했습니다.
4647 </ p >
47- < p className = "text-sm text-muted-foreground mb-4 " >
48+ < p className = "mb-4 text-sm text-muted-foreground" >
4849 잠시 후 다시 시도해주세요.
4950 </ p >
50- < div className = "flex gap-2" >
51+ < div className = "flex flex-wrap gap-2" >
5152 { isScheduleStatusError && (
52- < button
53+ < Button
5354 type = "button"
55+ variant = "secondary"
56+ size = "sm"
5457 onClick = { ( ) => refetchScheduleStatus ( ) }
55- className = "rounded-md bg-foreground px-4 py-2 text-background hover:bg-foreground/90 text-sm"
5658 >
5759 스케줄 통계 다시 시도
58- </ button >
60+ </ Button >
5961 ) }
6062 { isUserRoleError && (
61- < button
63+ < Button
6264 type = "button"
65+ variant = "secondary"
66+ size = "sm"
6367 onClick = { ( ) => refetchUserRole ( ) }
64- className = "rounded-md bg-foreground px-4 py-2 text-background hover:bg-foreground/90 text-sm"
6568 >
6669 사용자 통계 다시 시도
67- </ button >
70+ </ Button >
6871 ) }
6972 </ div >
7073 </ div >
@@ -73,32 +76,32 @@ export default function AdminPage() {
7376 }
7477
7578 return (
76- < div className = "container mx-auto py-8 px-4 max-w-4xl " >
77- < h1 className = "text-2xl font-bold text-foreground mb-6 " > 관리자 대시보드</ h1 >
79+ < div className = "mx-auto w-full max-w-4xl px-4 py-8 sm:px-6 lg:px-8 " >
80+ < h1 className = "mb-6 text-2xl font-bold text-foreground sm:text-3xl " > 관리자 대시보드</ h1 >
7881
7982 < div className = "flex flex-col gap-6" >
8083 { /* 사용자 통계 */ }
8184 { userRoleStats ? (
82- < section >
83- < h2 className = "text-base font-semibold text-foreground mb-3 " > 사용자 통계</ h2 >
85+ < section className = "min-w-0" >
86+ < h2 className = "mb-3 text-base font-semibold text-foreground" > 사용자 통계</ h2 >
8487 < StatsList < UserRole > stats = { userRoleStats } unit = "명" />
8588 </ section >
8689 ) : (
87- < section >
88- < h2 className = "text-base font-semibold text-foreground mb-3 " > 사용자 통계</ h2 >
90+ < section className = "min-w-0" >
91+ < h2 className = "mb-3 text-base font-semibold text-foreground" > 사용자 통계</ h2 >
8992 < p className = "text-muted-foreground" > 데이터를 불러올 수 없습니다.</ p >
9093 </ section >
9194 ) }
9295
9396 { /* 스케줄 통계 */ }
9497 { scheduleStatusStats ? (
95- < section >
96- < h2 className = "text-base font-semibold text-foreground mb-3 " > 스케줄 통계</ h2 >
98+ < section className = "min-w-0" >
99+ < h2 className = "mb-3 text-base font-semibold text-foreground" > 스케줄 통계</ h2 >
97100 < StatsList < ScheduleStatus > stats = { scheduleStatusStats } unit = "건" />
98101 </ section >
99102 ) : (
100- < section >
101- < h2 className = "text-base font-semibold text-foreground mb-3 " > 스케줄 통계</ h2 >
103+ < section className = "min-w-0" >
104+ < h2 className = "mb-3 text-base font-semibold text-foreground" > 스케줄 통계</ h2 >
102105 < p className = "text-muted-foreground" > 데이터를 불러올 수 없습니다.</ p >
103106 </ section >
104107 ) }
0 commit comments