1- import { Box , Typography } from "@mui/material" ;
21import type { BackProp , StepProps } from "~/app/signup/common" ;
32import type { Step1User } from "~/common/zod/types" ;
4- import UserAvatar from "~/components/human/avatar " ;
3+ import { CardFront } from "~/components/Card.tsx " ;
54import type { Step2Data } from "./step2_img" ;
65
7- interface UserInfoProp {
8- name : string ;
9- gender : string ;
10- grade : string ;
11- faculty : string ;
12- department : string ;
13- intro : string ;
14- pictureUrl : string ;
15- }
16-
176interface inputDataProps {
187 Step1Data : Step1User | undefined ;
198 Step2Data : Step2Data | undefined ;
@@ -37,38 +26,22 @@ export default function Confirmation({
3726 margin : "20px" ,
3827 } }
3928 >
40- < Typography variant = "h6" component = "h1" mb = { 2 } >
41- 確認
42- </ Typography >
43- < Box
44- sx = { {
45- display : "flex" ,
46- flexDirection : "column" ,
47- alignItems : "center" ,
48- } }
49- >
50- < CardFront UserInfo = { { ...Step1Data , ...Step2Data } } />
51- </ Box >
52- < div
53- style = { {
54- display : "flex" ,
55- flexDirection : "column" ,
56- alignItems : "center" ,
57- } }
58- >
29+ < h1 className = "mb-2 text-xl" > 確認</ h1 >
30+ < div className = "flex flex-col items-center" >
31+ < CardFront
32+ displayedUser = { {
33+ ...Step1Data ,
34+ ...Step2Data ,
35+ id : 0 ,
36+ guid : "zero" ,
37+ } }
38+ />
39+ </ div >
40+ < div className = "flex flex-col items-center" >
5941 < p > この内容で登録しますか?</ p >
6042 </ div >
6143 </ div >
62- < Box
63- p = { 3 }
64- sx = { {
65- position : "fixed" ,
66- display : "flex" ,
67- justifyContent : "space-between" ,
68- bottom : 0 ,
69- width : "100%" ,
70- } }
71- >
44+ < div className = "p-3 fixed flex justify-between bottom-0 w-full" >
7245 < button type = "button" onClick = { back } className = "btn" >
7346 前へ
7447 </ button >
@@ -79,47 +52,7 @@ export default function Confirmation({
7952 >
8053 次へ
8154 </ button >
82- </ Box >
83- </ >
84- ) ;
85- }
86-
87- function CardFront ( { UserInfo } : { UserInfo : UserInfoProp } ) {
88- return (
89- < div
90- style = { {
91- width : "70vw" ,
92- height : "70vh" ,
93- position : "relative" ,
94- backgroundColor : "#F7FCFF" ,
95- border : "2px solid #3596C6" ,
96- padding : "10px" ,
97- } }
98- >
99- < div
100- style = { {
101- display : "flex" ,
102- flexDirection : "row" ,
103- alignItems : "center" ,
104- justifyContent : "space-around" ,
105- } }
106- >
107- < div style = { { width : "50%" , maxWidth : "300px" , maxHeight : "300px" } } >
108- < UserAvatar
109- pictureUrl = { UserInfo ?. pictureUrl }
110- width = "80%"
111- height = "auto"
112- />
113- </ div >
114- < p style = { { fontSize : "4vw" , fontWeight : "bold" } } > { UserInfo ?. name } </ p >
11555 </ div >
116- < div style = { { padding : "10px" } } >
117- { UserInfo ?. grade && < p > 学年: { UserInfo . grade } </ p > }
118- { UserInfo ?. faculty && < p > 学部: { UserInfo . faculty } </ p > }
119- { UserInfo ?. department && < p > 学科: { UserInfo . department } </ p > }
120- { UserInfo ?. gender && < p > 性別: { UserInfo ?. gender } </ p > }
121- { UserInfo ?. intro && < p > 自己紹介: { UserInfo . intro } </ p > }
122- </ div >
123- </ div >
56+ </ >
12457 ) ;
12558}
0 commit comments