frontend fixes
This commit is contained in:
parent
b4def24a7e
commit
7f07090032
|
@ -27,7 +27,8 @@
|
|||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
"eject": "react-scripts eject",
|
||||
"dev": "npm run start && nodemon index.js"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
|
|
|
@ -106,11 +106,12 @@ export default function HomePage() {
|
|||
|
||||
<FeatureCol lg="6">
|
||||
<BigHeading>Adapt to a new place easy peasy.</BigHeading>
|
||||
|
||||
<button type="button" onClick={() => {
|
||||
history.push("/user/login")
|
||||
}} className="btn btn-info login mr-1">Log In</button>
|
||||
|
||||
<button type="button" className="btn btn-info loginb" onClick={() => history.push("/user/register")} >Sign Up</button>
|
||||
<button type="button" onClick={() => history.push("/user/register")} >Sign Up</button>
|
||||
|
||||
</FeatureCol>
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ const Login = () => {
|
|||
user: loginRes.data.user,
|
||||
});
|
||||
localStorage.setItem("auth-token", loginRes.data.token);
|
||||
console.log(userData);
|
||||
history.push("/");
|
||||
} catch (err) {
|
||||
err.response.data.msg && setError(err.response.data.msg);
|
||||
|
|
|
@ -96,28 +96,6 @@ export default function NavBar() {
|
|||
{userData.user ? (
|
||||
<React.Fragment>
|
||||
<li><Link onClick={logout}>{userData.user.username}</Link></li>
|
||||
<li class="nr_li dd_main">
|
||||
<img src="https://i.imgur.com/2QKIaJ5.png" alt="profile_img" />
|
||||
|
||||
<div class="dd_menu">
|
||||
<div class="dd_left">
|
||||
<ul>
|
||||
|
||||
<li><i class="fas fa-cog"></i></li>
|
||||
<li><i class="fas fa-sign-out-alt"></i></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="dd_right">
|
||||
<ul>
|
||||
<li>Settings</li>
|
||||
<li>Logout</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nr_li">
|
||||
<i class="fas fa-envelope-open-text"></i>
|
||||
</li>
|
||||
</React.Fragment>
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useState, useContext } from "react";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import { useHistory, withRouter } from "react-router-dom";
|
||||
import UserContext from "../context/UserContext";
|
||||
import Axios from "axios";
|
||||
import { Link } from "react-router-dom";
|
||||
|
@ -30,7 +30,7 @@ import ErrorNotice from "./ErrorNotice";
|
|||
user: loginRes.data.user,
|
||||
});
|
||||
localStorage.setItem("auth-token", loginRes.data.token);
|
||||
history.push("/home");
|
||||
history.push("/");
|
||||
} catch (err) {
|
||||
return err.response.data.msg && setError(err.response.data.msg);
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ import ErrorNotice from "./ErrorNotice";
|
|||
|
||||
<div className="FormField">
|
||||
<label className="FormField__CheckboxLabel">
|
||||
<input className="FormField__Checkbox" type="checkbox" name="hasAgreed" /> I agree all statements in <a href="/" className="FormField__TermsLink">terms of service</a>
|
||||
<input className="FormField__Checkbox" type="checkbox" name="hasAgreed" required="true" /> I agree all statements in <a href="/" className="FormField__TermsLink">terms of service</a>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
@ -99,4 +99,4 @@ import ErrorNotice from "./ErrorNotice";
|
|||
);
|
||||
}
|
||||
|
||||
export default Register;
|
||||
export default withRouter( Register );
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.Apper {
|
||||
display: flex;
|
||||
color: white;
|
||||
height:100%;
|
||||
height:100vh;
|
||||
}
|
||||
|
||||
.Apper__Aside {
|
||||
|
@ -32,13 +32,14 @@
|
|||
font-family: "Ubuntu";
|
||||
font-size: 5rem;
|
||||
font-weight: bold;
|
||||
color: rgb(24, 14, 14);
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
text-transform: lowercase;
|
||||
}
|
||||
.Apper_logo img{
|
||||
width:100px;
|
||||
display:flex;
|
||||
margin-bottom: 50px;
|
||||
align-content: flex-start;
|
||||
justify-content: flex-start;
|
||||
|
||||
|
@ -46,6 +47,7 @@
|
|||
|
||||
.Apper__Aside__text {
|
||||
text-align: center;
|
||||
margin-bottom: 25%;
|
||||
|
||||
}
|
||||
.Apper_quote{
|
||||
|
@ -53,9 +55,10 @@
|
|||
font-size: 1.25em;
|
||||
font-style:italic;
|
||||
}
|
||||
.Apper__Aside_image{
|
||||
.Apper__Aside_image img{
|
||||
margin-top: 600px;
|
||||
max-width: 100%;
|
||||
width: 900px;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -124,7 +127,6 @@
|
|||
font-size: 1.25em;
|
||||
color: #4C5D72;
|
||||
text-align: start;
|
||||
margin-left:45px;
|
||||
|
||||
}
|
||||
.FormField__Input {
|
||||
|
|
Loading…
Reference in New Issue