11"use client" ;
22
3- import { Box , Typography } from "@mui/material" ;
43import Link from "next/link" ;
54import { useAboutMe } from "~/api/user" ;
65import FullScreenCircularProgress from "~/components/common/FullScreenCircularProgress" ;
7- import { NavigateByAuthState } from "~/components/common/NavigateByAuthState" ;
86import EditableCoursesTable from "~/components/course/EditableCoursesTable" ;
97
108export default function EditCourses ( ) {
@@ -14,48 +12,27 @@ export default function EditCourses() {
1412 const error = state . current === "error" ? state . error : null ;
1513
1614 return (
17- < NavigateByAuthState type = "toLoginForUnauthenticated" >
18- < Box
19- sx = { {
20- padding : "20px" ,
21- maxWidth : "350px" ,
22- height : "100%" ,
23- margin : "0 auto" ,
24- display : "flex" ,
25- flexDirection : "column" ,
26- textAlign : "center" ,
27- } }
28- >
29- < Typography variant = "h6" component = "h1" mb = { 1 } >
30- 授業編集
31- </ Typography >
32- { loading ? (
33- < FullScreenCircularProgress />
34- ) : error ? (
35- < p > Error: { error . message } </ p >
36- ) : data ? (
37- < >
38- < EditableCoursesTable userId = { data . id } />
39- </ >
40- ) : (
41- < p > データがありません。</ p >
42- ) }
43-
44- < Box
45- sx = { {
46- display : "flex" ,
47- justifyContent : "space-between" ,
48- marginTop : "20px" ,
49- } }
50- >
51- < Link href = "/settings/profile" className = "btn" >
52- 設定画面に戻る
53- </ Link >
54- < Link href = "/edit/profile" className = "btn btn-primary" >
55- プロフィール編集へ
56- </ Link >
57- </ Box >
58- </ Box >
59- </ NavigateByAuthState >
15+ < div className = "mx-auto my-0 flex h-full max-w-[350] flex-col p-5 text-center" >
16+ < h1 className = "mb-2 text-xl" > 授業編集</ h1 >
17+ { loading ? (
18+ < FullScreenCircularProgress />
19+ ) : error ? (
20+ < p > Error: { error . message } </ p >
21+ ) : data ? (
22+ < >
23+ < EditableCoursesTable userId = { data . id } />
24+ </ >
25+ ) : (
26+ < p > データがありません。</ p >
27+ ) }
28+ < div className = "mt-5 flex justify-between" >
29+ < Link href = "/settings/profile" className = "btn" >
30+ 設定画面に戻る
31+ </ Link >
32+ < Link href = "/edit/profile" className = "btn btn-primary" >
33+ プロフィール編集へ
34+ </ Link >
35+ </ div >
36+ </ div >
6037 ) ;
6138}
0 commit comments