Skip to content

Commit 72de832

Browse files
fixed login and register styles
1 parent b218098 commit 72de832

File tree

2 files changed

+38
-35
lines changed

2 files changed

+38
-35
lines changed

client/src/components/auth/Login.js

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
import React, { useState, useEffect, Fragment } from "react";
2-
import { connect } from "react-redux";
3-
import { login } from "../../actions/authAction";
4-
import { removeNav } from "../../actions/navAction";
5-
import { loadProfile } from "../../actions/profileAction";
6-
import { Link } from "react-router-dom";
7-
import i from "../../utils/mediaQ";
8-
9-
// Assets import
10-
import auth from "../../assets/auth.jpg";
11-
import Alert from "../alerts/Alert";
121
import {
132
Box,
3+
Button,
144
Flex,
155
Heading,
6+
HStack,
167
Image,
17-
Text,
188
Input,
19-
HStack,
20-
Button,
9+
Text,
2110
} from "@chakra-ui/react";
11+
import React, { Fragment, useEffect, useState } from "react";
12+
import { connect } from "react-redux";
13+
import { Link } from "react-router-dom";
14+
import { login } from "../../actions/authAction";
15+
import { removeNav } from "../../actions/navAction";
16+
import { loadProfile } from "../../actions/profileAction";
17+
// Assets import
18+
import auth from "../../assets/auth.jpg";
19+
import i from "../../utils/mediaQ";
20+
import Alert from "../alerts/Alert";
2221

2322
const Login = ({
2423
auth: { isAuthenticated },
@@ -68,13 +67,14 @@ const Login = ({
6867
return (
6968
<Fragment>
7069
<Box w={i() ? "calc(100% - 700px)" : ""}>
71-
<Flex alignItems="center" flexDirection="column" pt="2.5rem">
70+
<Flex alignItems="center" flexDirection="column" pt="2.5rem" mt="3rem">
7271
<Heading as="h1">Welcome to DevHelp</Heading>
7372
<Text
74-
color="#00000080"
7573
px={i() ? "" : "60px"}
7674
fontSize={i() ? "" : "14px"}
7775
textAlign="center"
76+
mt="1rem"
77+
fontSize="20px"
7878
>
7979
DevHelp has a pool of highly experienced developers in their
8080
respective tech stacks
@@ -112,15 +112,14 @@ const Login = ({
112112
<Button
113113
isLoading={loading}
114114
loadingText="Logging In"
115-
colorScheme="blackAlpha"
116115
w={i() ? "450px" : "280px"}
117116
type="submit"
118117
onClick={onSubmit}
119118
>
120119
Login
121120
</Button>
122121
</Flex>
123-
<Flex justifyContent="center">
122+
<Flex justifyContent="center" mt="2rem">
124123
New user?{" "}
125124
<Link to="sign-up">
126125
<Text ml="5px" color="#0066ff">

client/src/components/auth/Register.js

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
import React, { useState, useEffect, Fragment } from "react";
2-
import { connect } from "react-redux";
3-
import { register } from "../../actions/authAction";
4-
import { removeNav } from "../../actions/navAction";
5-
import { Link } from "react-router-dom";
6-
7-
import Alert from "../alerts/Alert";
8-
9-
// Assets import
10-
import auth from "../../assets/auth.jpg";
111
import {
122
Box,
3+
Button,
134
Flex,
145
Heading,
6+
HStack,
157
Image,
16-
Text,
178
Input,
18-
HStack,
19-
Button,
9+
Text,
2010
} from "@chakra-ui/react";
11+
import React, { Fragment, useEffect, useState } from "react";
12+
import { connect } from "react-redux";
13+
import { Link } from "react-router-dom";
14+
import { register } from "../../actions/authAction";
15+
import { removeNav } from "../../actions/navAction";
16+
// Assets import
17+
import auth from "../../assets/auth.jpg";
18+
import i from "../../utils/mediaQ";
19+
import Alert from "../alerts/Alert";
2120

2221
const Register = ({
2322
auth: { isAuthenticated },
@@ -70,9 +69,15 @@ const Register = ({
7069
return (
7170
<Fragment>
7271
<Box w="calc(100% - 700px)">
73-
<Flex alignItems="center" flexDirection="column" pt="2.5rem">
72+
<Flex alignItems="center" flexDirection="column" pt="2.5rem" mt="3rem">
7473
<Heading as="h1">Welcome to DevHelp</Heading>
75-
<Text>
74+
<Text
75+
px={i() ? "" : "60px"}
76+
fontSize={i() ? "" : "14px"}
77+
textAlign="center"
78+
mt="1rem"
79+
fontSize="20px"
80+
>
7681
DevHelp has a pool of highly experienced developers in their
7782
respective tech stacks
7883
</Text>
@@ -121,15 +126,14 @@ const Register = ({
121126
<Button
122127
isLoading={loading}
123128
loadingText="Logging In"
124-
colorScheme="blackAlpha"
125129
w="450px"
126130
type="submit"
127131
onClick={onSubmit}
128132
>
129133
Sign Up
130134
</Button>
131135
</Flex>
132-
<Flex justifyContent="center">
136+
<Flex justifyContent="center" mt="2rem">
133137
Already a user?{" "}
134138
<Link to="login">
135139
<Text ml="5px" color="#0066ff">

0 commit comments

Comments
 (0)