|
1 | 1 | import { useAuth } from 'lib/auth'
|
2 | 2 |
|
| 3 | +import { Layout } from 'components/Layout' |
| 4 | + |
3 | 5 | const Dashboard = () => {
|
4 | 6 | const auth = useAuth()
|
5 | 7 | return (
|
6 |
| - <main className="relative w-full min-h-screen bg-gray-900"> |
7 |
| - <div className="absolute right-full bg-red-400 w-20 h-full transform translate-x-2 sm:translate-x-6 md:translate-x-12 lg:translate-x-16 xl:translate-x-20 lg: z-10" /> |
8 |
| - <div className="flex flex-col items-center px-10 sm:px-16 md:px-24"> |
9 |
| - <div className="flex flex-col mt-28 sm:mt-32 mb-20 max-w-2xl divide-y divide-white w-full font-display border-b border-white"> |
10 |
| - <div className="flex justify-between py-6 items-center"> |
11 |
| - <div className="flex flex-col"> |
12 |
| - <p className="font-semibold text-white">ข้อมูลผู้เข้าแข่งขัน</p> |
13 |
| - <p className="text-white">Personal details</p> |
| 8 | + <Layout> |
| 9 | + <main className="relative w-full min-h-screen bg-gray-900"> |
| 10 | + <div className="flex flex-col items-center px-10 sm:px-16 md:px-24"> |
| 11 | + <div className="flex flex-col mt-28 sm:mt-32 mb-20 max-w-2xl divide-y divide-white w-full font-display border-b border-white"> |
| 12 | + <div className="flex justify-between py-6 items-center"> |
| 13 | + <div className="flex flex-col"> |
| 14 | + <p className="font-semibold text-white">ข้อมูลผู้เข้าแข่งขัน</p> |
| 15 | + <p className="text-white">Personal details</p> |
| 16 | + </div> |
| 17 | + <button className="bg-red-400 py-3 px-4 text-white font-bold rounded-3xl"> |
| 18 | + เข้าสู่การแข่งขัน |
| 19 | + </button> |
14 | 20 | </div>
|
15 |
| - <button className="bg-red-400 py-3 px-4 text-white font-bold rounded-3xl"> |
16 |
| - เข้าสู่การแข่งขัน |
17 |
| - </button> |
18 |
| - </div> |
19 |
| - <div className="flex w-full py-6"> |
20 |
| - <p className="w-1/3 text-white font-semibold">ชื่อผู้ใช้</p> |
21 |
| - <p className="w-2/3 text-white pl-4">{auth?.userData?.username}</p> |
22 |
| - </div> |
23 |
| - {auth?.userData?.anonymous ? ( |
24 | 21 | <div className="flex w-full py-6">
|
25 |
| - <p className="text-white"> |
26 |
| - <b>เข้าร่วมแบบไม่เปิดเผยตัวตน</b>{' '} |
27 |
| - ไม่มีการแสดงคะแนนต่อสาธารณะในระหว่างการแข่ง |
28 |
| - รวมถึงไม่นำไปคิดคะแนนแข่งขัน และไม่ได้รับของรางวัล |
| 22 | + <p className="w-1/3 text-white font-semibold">ชื่อผู้ใช้</p> |
| 23 | + <p className="w-2/3 text-white pl-4"> |
| 24 | + {auth?.userData?.username} |
29 | 25 | </p>
|
30 | 26 | </div>
|
31 |
| - ) : ( |
32 |
| - <> |
| 27 | + {auth?.userData?.anonymous ? ( |
33 | 28 | <div className="flex w-full py-6">
|
34 |
| - <p className="w-1/3 text-white font-semibold">ชื่อ-สกุล</p> |
35 |
| - <p className="w-2/3 text-white pl-4"> |
36 |
| - {auth?.userData?.firstname} {auth?.userData?.lastname} |
| 29 | + <p className="text-white"> |
| 30 | + <b>เข้าร่วมแบบไม่เปิดเผยตัวตน</b>{' '} |
| 31 | + ไม่มีการแสดงคะแนนต่อสาธารณะในระหว่างการแข่ง |
| 32 | + รวมถึงไม่นำไปคิดคะแนนแข่งขัน และไม่ได้รับของรางวัล |
37 | 33 | </p>
|
38 | 34 | </div>
|
39 |
| - <div className="flex w-full py-6"> |
40 |
| - <p className="w-1/3 text-white font-semibold">อีเมล</p> |
41 |
| - <p className="w-2/3 text-white overflow-x-scroll pl-4"> |
42 |
| - {auth?.userData?.email} |
43 |
| - </p> |
44 |
| - </div> |
45 |
| - <div className="flex w-full py-6"> |
46 |
| - <p className="w-1/3 text-white font-semibold"> |
47 |
| - เบอร์โทรศัพท์สำหรับติดต่อ |
48 |
| - </p> |
49 |
| - <p className="w-2/3 text-white pl-4">{auth?.userData?.tel}</p> |
50 |
| - </div> |
51 |
| - <div className="flex w-full py-6"> |
52 |
| - <p className="w-1/3 text-white font-semibold"> |
53 |
| - ที่อยู่สำหรับส่งของรางวัล |
54 |
| - </p> |
55 |
| - <p className="w-2/3 text-white pl-4"> |
56 |
| - {auth?.userData?.address} |
57 |
| - </p> |
58 |
| - </div> |
59 |
| - <div className="flex w-full py-6"> |
60 |
| - <p className="w-1/3 text-white font-semibold">ขนาดเสื้อ</p> |
61 |
| - <p className="w-2/3 text-white pl-4">{auth?.userData?.size}</p> |
62 |
| - </div> |
63 |
| - </> |
64 |
| - )} |
| 35 | + ) : ( |
| 36 | + <> |
| 37 | + <div className="flex w-full py-6"> |
| 38 | + <p className="w-1/3 text-white font-semibold">ชื่อ-สกุล</p> |
| 39 | + <p className="w-2/3 text-white pl-4"> |
| 40 | + {auth?.userData?.firstname} {auth?.userData?.lastname} |
| 41 | + </p> |
| 42 | + </div> |
| 43 | + <div className="flex w-full py-6"> |
| 44 | + <p className="w-1/3 text-white font-semibold">อีเมล</p> |
| 45 | + <p className="w-2/3 text-white overflow-x-scroll pl-4"> |
| 46 | + {auth?.userData?.email} |
| 47 | + </p> |
| 48 | + </div> |
| 49 | + <div className="flex w-full py-6"> |
| 50 | + <p className="w-1/3 text-white font-semibold"> |
| 51 | + เบอร์โทรศัพท์สำหรับติดต่อ |
| 52 | + </p> |
| 53 | + <p className="w-2/3 text-white pl-4">{auth?.userData?.tel}</p> |
| 54 | + </div> |
| 55 | + <div className="flex w-full py-6"> |
| 56 | + <p className="w-1/3 text-white font-semibold"> |
| 57 | + ที่อยู่สำหรับส่งของรางวัล |
| 58 | + </p> |
| 59 | + <p className="w-2/3 text-white pl-4"> |
| 60 | + {auth?.userData?.address} |
| 61 | + </p> |
| 62 | + </div> |
| 63 | + <div className="flex w-full py-6"> |
| 64 | + <p className="w-1/3 text-white font-semibold">ขนาดเสื้อ</p> |
| 65 | + <p className="w-2/3 text-white pl-4"> |
| 66 | + {auth?.userData?.size} |
| 67 | + </p> |
| 68 | + </div> |
| 69 | + </> |
| 70 | + )} |
| 71 | + </div> |
65 | 72 | </div>
|
66 |
| - </div> |
67 |
| - </main> |
| 73 | + </main> |
| 74 | + </Layout> |
68 | 75 | )
|
69 | 76 | }
|
70 | 77 |
|
|
0 commit comments