@@ -9,6 +9,16 @@ import Alert from "../alerts/Alert";
9
9
10
10
// Assets import
11
11
import auth from "../../assets/auth.jpg" ;
12
+ import {
13
+ Box ,
14
+ Flex ,
15
+ Heading ,
16
+ Image ,
17
+ Text ,
18
+ Input ,
19
+ HStack ,
20
+ Button ,
21
+ } from "@chakra-ui/react" ;
12
22
13
23
const Register = ( {
14
24
auth : { isAuthenticated } ,
@@ -60,78 +70,84 @@ const Register = ({
60
70
61
71
return (
62
72
< Fragment >
63
- < div className = "d-flex flex-column align-items-center justify-content-start left ">
64
- < div className = "top text- center">
65
- < h1 > Welcome to DevHelp</ h1 >
66
- < p >
73
+ < Box w = "calc(100% - 700px) ">
74
+ < Flex alignItems = " center" flexDirection = "column" pt = "2.5rem ">
75
+ < Heading as = "h1" > Welcome to DevHelp</ Heading >
76
+ < Text >
67
77
DevHelp has a pool of highly experienced developers in their
68
78
respective tech stacks
69
- </ p >
70
- < h2 > Sign Up</ h2 >
71
- </ div >
79
+ </ Text >
80
+ < Heading as = "h2" fontSize = "25px" py = "20px" mt = "100px" >
81
+ Sign Up
82
+ </ Heading >
83
+ </ Flex >
72
84
< Alert />
73
- < form
74
- className = "d-flex flex-column align-items-center justify-content-start sign-up-form"
75
- onSubmit = { onSubmit }
76
- >
77
- < div className = "d-flex flex-row name-inp" >
78
- < span className = "d-flex justify-content-center align-items-center user-cont" >
85
+ < Flex flexDirection = "column" alignItems = "center" >
86
+ < HStack mb = "1rem" w = "450px" >
87
+ < Box >
79
88
< i className = "fas fa-user" > </ i >
80
- </ span >
81
- < input
89
+ </ Box >
90
+ < Input
82
91
type = "text"
83
- className = "name-inp-cls"
84
92
name = "name"
85
93
placeholder = "Name"
86
94
value = { name }
87
95
onChange = { onChange }
88
96
/>
89
- </ div >
90
- < div className = "d-flex flex-row name-inp ">
91
- < span className = "d-flex justify-content-center align-items-center user-cont" >
97
+ </ HStack >
98
+ < HStack mb = "1rem" w = "450px ">
99
+ < Box >
92
100
< i className = "fas fa-envelope" > </ i >
93
- </ span >
94
- < input
101
+ </ Box >
102
+ < Input
95
103
type = "text"
96
- className = "name-inp-cls"
97
104
name = "email"
98
105
placeholder = "Email"
99
106
value = { email }
100
107
onChange = { onChange }
101
108
/>
102
- </ div >
103
- < div className = "d-flex flex-row name-inp ">
104
- < span className = "d-flex justify-content-center align-items-center user-cont" >
109
+ </ HStack >
110
+ < HStack mb = "1rem" w = "450px ">
111
+ < Box >
105
112
< i className = "fas fa-lock" > </ i >
106
- </ span >
107
- < input
113
+ </ Box >
114
+ < Input
108
115
type = "password"
109
- className = "name-inp-cls"
110
116
name = "password"
111
117
placeholder = "Password"
112
118
value = { password }
113
119
onChange = { onChange }
114
120
/>
115
- </ div >
116
- < button className = "btn btn-dark" type = "submit" >
117
- { loading && alert . length === 0 && (
118
- < span
119
- className = "spinner-border spinner-border-sm "
120
- aria-hidden = "true "
121
- > </ span >
122
- ) }
123
-
124
- < span > { loading && alert . length === 0 ? "" : " Sign Up" } </ span >
125
- </ button >
126
- </ form >
127
- < p className = "wrong-pg ">
121
+ </ HStack >
122
+ < Button
123
+ isLoading = { loading }
124
+ loadingText = "Logging In"
125
+ colorScheme = "blackAlpha "
126
+ w = "450px "
127
+ type = "submit"
128
+ onClick = { onSubmit }
129
+ >
130
+ Sign Up
131
+ </ Button >
132
+ </ Flex >
133
+ < Flex justifyContent = "center ">
128
134
Already a user?{ " " }
129
- < Link to = "/login" > Login</ Link >
130
- </ p >
131
- </ div >
132
- < div className = "right" >
133
- < img src = { auth } alt = "" />
134
- </ div >
135
+ < Link to = "login" >
136
+ < Text ml = "5px" color = "#0066ff" >
137
+ Login
138
+ </ Text >
139
+ </ Link >
140
+ </ Flex >
141
+ </ Box >
142
+ < Box >
143
+ < Image
144
+ src = { auth }
145
+ alt = "random"
146
+ width = "700px"
147
+ height = "100vh"
148
+ maxWidth = "700px"
149
+ />
150
+ </ Box >
135
151
</ Fragment >
136
152
) ;
137
153
} ;
0 commit comments