frontend fixes
This commit is contained in:
parent
b4def24a7e
commit
7f07090032
|
@ -27,7 +27,8 @@
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start",
|
||||||
"build": "react-scripts build",
|
"build": "react-scripts build",
|
||||||
"test": "react-scripts test",
|
"test": "react-scripts test",
|
||||||
"eject": "react-scripts eject"
|
"eject": "react-scripts eject",
|
||||||
|
"dev": "npm run start && nodemon index.js"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": [
|
"extends": [
|
||||||
|
|
|
@ -106,11 +106,12 @@ export default function HomePage() {
|
||||||
|
|
||||||
<FeatureCol lg="6">
|
<FeatureCol lg="6">
|
||||||
<BigHeading>Adapt to a new place easy peasy.</BigHeading>
|
<BigHeading>Adapt to a new place easy peasy.</BigHeading>
|
||||||
|
|
||||||
<button type="button" onClick={() => {
|
<button type="button" onClick={() => {
|
||||||
history.push("/user/login")
|
history.push("/user/login")
|
||||||
}} className="btn btn-info login mr-1">Log In</button>
|
}} 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>
|
</FeatureCol>
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ const Login = () => {
|
||||||
user: loginRes.data.user,
|
user: loginRes.data.user,
|
||||||
});
|
});
|
||||||
localStorage.setItem("auth-token", loginRes.data.token);
|
localStorage.setItem("auth-token", loginRes.data.token);
|
||||||
console.log(userData);
|
|
||||||
history.push("/");
|
history.push("/");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
err.response.data.msg && setError(err.response.data.msg);
|
err.response.data.msg && setError(err.response.data.msg);
|
||||||
|
|
|
@ -96,28 +96,6 @@ export default function NavBar() {
|
||||||
{userData.user ? (
|
{userData.user ? (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<li><Link onClick={logout}>{userData.user.username}</Link></li>
|
<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>
|
</React.Fragment>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React, { useState, useContext } from "react";
|
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 UserContext from "../context/UserContext";
|
||||||
import Axios from "axios";
|
import Axios from "axios";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
|
@ -30,7 +30,7 @@ import ErrorNotice from "./ErrorNotice";
|
||||||
user: loginRes.data.user,
|
user: loginRes.data.user,
|
||||||
});
|
});
|
||||||
localStorage.setItem("auth-token", loginRes.data.token);
|
localStorage.setItem("auth-token", loginRes.data.token);
|
||||||
history.push("/home");
|
history.push("/");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return err.response.data.msg && setError(err.response.data.msg);
|
return err.response.data.msg && setError(err.response.data.msg);
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ import ErrorNotice from "./ErrorNotice";
|
||||||
|
|
||||||
<div className="FormField">
|
<div className="FormField">
|
||||||
<label className="FormField__CheckboxLabel">
|
<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>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -99,4 +99,4 @@ import ErrorNotice from "./ErrorNotice";
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Register;
|
export default withRouter( Register );
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
.Apper {
|
.Apper {
|
||||||
display: flex;
|
display: flex;
|
||||||
color: white;
|
color: white;
|
||||||
height:100%;
|
height:100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Apper__Aside {
|
.Apper__Aside {
|
||||||
|
@ -32,13 +32,14 @@
|
||||||
font-family: "Ubuntu";
|
font-family: "Ubuntu";
|
||||||
font-size: 5rem;
|
font-size: 5rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: rgb(24, 14, 14);
|
color: #ffffff;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
text-transform: lowercase;
|
text-transform: lowercase;
|
||||||
}
|
}
|
||||||
.Apper_logo img{
|
.Apper_logo img{
|
||||||
width:100px;
|
width:100px;
|
||||||
display:flex;
|
display:flex;
|
||||||
|
margin-bottom: 50px;
|
||||||
align-content: flex-start;
|
align-content: flex-start;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
|
|
||||||
|
@ -46,6 +47,7 @@
|
||||||
|
|
||||||
.Apper__Aside__text {
|
.Apper__Aside__text {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
margin-bottom: 25%;
|
||||||
|
|
||||||
}
|
}
|
||||||
.Apper_quote{
|
.Apper_quote{
|
||||||
|
@ -53,9 +55,10 @@
|
||||||
font-size: 1.25em;
|
font-size: 1.25em;
|
||||||
font-style:italic;
|
font-style:italic;
|
||||||
}
|
}
|
||||||
.Apper__Aside_image{
|
.Apper__Aside_image img{
|
||||||
margin-top: 600px;
|
margin-top: 600px;
|
||||||
max-width: 100%;
|
width: 900px;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -124,7 +127,6 @@
|
||||||
font-size: 1.25em;
|
font-size: 1.25em;
|
||||||
color: #4C5D72;
|
color: #4C5D72;
|
||||||
text-align: start;
|
text-align: start;
|
||||||
margin-left:45px;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.FormField__Input {
|
.FormField__Input {
|
||||||
|
|
Loading…
Reference in New Issue