diff --git a/frontend/src/App.js b/frontend/src/App.js index 9315d02..825ec08 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -1,15 +1,37 @@ -import React from "react"; +import React, { useState } from "react"; import { BrowserRouter, Route, Switch } from "react-router-dom"; import Portfolio from "./components/Portfolio"; import Bank from "./components/Bank"; import Profile from "./components/Profile"; import Browse from "./components/Browse"; +import Login from "./components/Login"; import "./App.css"; function App() { + const adminUser = { + + email: "admin@admin.com", + password: "admin123" + + } + + const [user, setUser] = useState({name: "", email: ""}); + const [error, setError] = useState(""); + + const Login = details => { + console.log(details); + + } + + const Logout = () => { + console.log("Logout"); + } + return ( - + +
+ @@ -17,6 +39,16 @@ function App() { + {(user.email !== "") ? ( +
+

Welcome, {user.name}

+ +
+ ) : ( + + )} + +
); } diff --git a/frontend/src/components/Login.js b/frontend/src/components/Login.js new file mode 100644 index 0000000..71a5793 --- /dev/null +++ b/frontend/src/components/Login.js @@ -0,0 +1,26 @@ +import React from 'react'; + +const Login = (props) => { + return ( + +
+
+

Login

+
+ + +
+
+ + +
+
+ + +
+
+
+ ) +} + +export default Login diff --git a/frontend/src/components/assets/Login.css b/frontend/src/components/assets/Login.css new file mode 100644 index 0000000..e69de29