Skip to content

Commit bb95f80

Browse files
styled register page
1 parent e11dc4e commit bb95f80

File tree

2 files changed

+69
-51
lines changed

2 files changed

+69
-51
lines changed

client/src/components/auth/Login.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ const Login = ({
7070
<Box w="calc(100% - 700px)">
7171
<Flex alignItems="center" flexDirection="column" pt="2.5rem">
7272
<Heading as="h1">Welcome to DevHelp</Heading>
73-
<Text color='#00000080'>
73+
<Text color="#00000080">
7474
DevHelp has a pool of highly experienced developers in their
7575
respective tech stacks
7676
</Text>
77-
<Heading as="h2" fontSize="25px" py="20px" mt='100px'>
77+
<Heading as="h2" fontSize="25px" py="20px" mt="100px">
7878
Login
7979
</Heading>
8080
</Flex>
@@ -115,10 +115,12 @@ const Login = ({
115115
Login
116116
</Button>
117117
</Flex>
118-
<Flex justifyContent="center" className="wrong-pg">
118+
<Flex justifyContent="center">
119119
New user?{" "}
120120
<Link to="sign-up">
121-
<Text ml='5px' color="#0066ff">Sign Up</Text>
121+
<Text ml="5px" color="#0066ff">
122+
Sign Up
123+
</Text>
122124
</Link>
123125
</Flex>
124126
</Box>

client/src/components/auth/Register.js

Lines changed: 63 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ import Alert from "../alerts/Alert";
99

1010
// Assets import
1111
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";
1222

1323
const Register = ({
1424
auth: { isAuthenticated },
@@ -60,78 +70,84 @@ const Register = ({
6070

6171
return (
6272
<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>
6777
DevHelp has a pool of highly experienced developers in their
6878
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>
7284
<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>
7988
<i className="fas fa-user"></i>
80-
</span>
81-
<input
89+
</Box>
90+
<Input
8291
type="text"
83-
className="name-inp-cls"
8492
name="name"
8593
placeholder="Name"
8694
value={name}
8795
onChange={onChange}
8896
/>
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>
92100
<i className="fas fa-envelope"></i>
93-
</span>
94-
<input
101+
</Box>
102+
<Input
95103
type="text"
96-
className="name-inp-cls"
97104
name="email"
98105
placeholder="Email"
99106
value={email}
100107
onChange={onChange}
101108
/>
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>
105112
<i className="fas fa-lock"></i>
106-
</span>
107-
<input
113+
</Box>
114+
<Input
108115
type="password"
109-
className="name-inp-cls"
110116
name="password"
111117
placeholder="Password"
112118
value={password}
113119
onChange={onChange}
114120
/>
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">
128134
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>
135151
</Fragment>
136152
);
137153
};

0 commit comments

Comments
 (0)