Skip to content

Commit

Permalink
Link buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Dalmano committed Jun 20, 2019
1 parent e270484 commit 102f673
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 19 deletions.
21 changes: 13 additions & 8 deletions src/components/Homepage/Founders/Founders.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import React from "react";
import "./Founders.css";
import Founder from "./Founder/Founder"
import Founder from "./Founder/Founder";
import { Link } from "react-router-dom";

const Founders = () => {
return (
Expand Down Expand Up @@ -30,13 +31,17 @@ const Founders = () => {
/>
</div>
<p className="FoundersComponent--text">
In our final year of university, we noticed that business' recruitment strategies were failing to reach students in an effective way. So we set out to find a solution, which led us to Groundworks. Our way to revolutionise how companies connect with students worldwide.
In our final year of university, we noticed that business' recruitment
strategies were failing to reach students in an effective way. So we set
out to find a solution, which led us to Groundworks. Our way to
revolutionise how companies connect with students worldwide.
</p>
<button className="FoundersComponent--joinbutton">
Join
</button>

<Link to={"/Join"}>
<button className="FoundersComponent--joinbutton">Join</button>
</Link>
</div>
)
}
);
};

export default Founders;
10 changes: 6 additions & 4 deletions src/components/LoginRegister/LoginPortal/LoginPortal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useContext } from "react";
import "./LoginPortal.css";
import LoginContext from './LoginContext';
import LoginContext from "./LoginContext";

const LoginPortal = () => {
const [newEmail, setEmail] = useState("");
Expand All @@ -11,10 +11,12 @@ const LoginPortal = () => {
console.log(details);
console.log(newEmail, newPassword);

const [details, setDetails] = useContext(LoginContext); //moved inside submit function
const [details, setDetails] = useContext(LoginContext); //moved inside submit function

setDetails(details => [{email: newEmail, password: newPassword}])
console.log(details)
// props.history.push("/StudentDashboard");

setDetails(details => [{ email: newEmail, password: newPassword }]);
console.log(details);
};

return (
Expand Down
3 changes: 3 additions & 0 deletions src/components/LoginRegister/RegisterPortal/RegisterPortal.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ const RegisterPortal = () => {
}
};
addRegister();

// props.history.push("/StudentDashboard");

setData({
userName: "",
email: "",
Expand Down
16 changes: 9 additions & 7 deletions src/components/Navbar/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ const NavBar = () => {
return (
<div className="NavBar">
<ul className="NavBar--ul">
<li>
<img
className="NavBar--li__logo"
src="https://user-images.githubusercontent.com/30301023/59760468-54f51200-928a-11e9-8009-2ae607c498b5.png"
alt="GroundWorks Logo"
/>
</li>
<Link to={"/"}>
<li>
<img
className="NavBar--li__logo"
src="https://user-images.githubusercontent.com/30301023/59760468-54f51200-928a-11e9-8009-2ae607c498b5.png"
alt="GroundWorks Logo"
/>
</li>
</Link>
<li className="NavBar--li">
<Link to={"/Join"} className="NavBar--li__a NavBar--joinbutton">
Join
Expand Down

0 comments on commit 102f673

Please sign in to comment.