From 518b4c1281d261153ddc309c5a2e62b15ea2b124 Mon Sep 17 00:00:00 2001 From: AntonioWorkman Date: Wed, 7 Apr 2021 18:24:23 -0400 Subject: [PATCH 1/3] fix: resolved errors --- src/styles/main.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/main.css b/src/styles/main.css index 3c28ded..bb4ebc8 100644 --- a/src/styles/main.css +++ b/src/styles/main.css @@ -1,6 +1,6 @@ /* Import tailwind styles */ -/* ! tailwindcss v2.1.1 | MIT License | https://tailwindcss.com */ +/* ! tailwindcss v2.1.0 | MIT License | https://tailwindcss.com */ /*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */ From 6a985fe86a395d8335e87aa962b1d14b842a5848 Mon Sep 17 00:00:00 2001 From: AntonioWorkman Date: Mon, 26 Apr 2021 15:44:59 -0400 Subject: [PATCH 2/3] feat: add profile page --- src/App.js | 2 ++ src/components/Profile.js | 61 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 src/components/Profile.js diff --git a/src/App.js b/src/App.js index 3dd43f5..1582bf7 100644 --- a/src/App.js +++ b/src/App.js @@ -4,6 +4,7 @@ import Login from "./components/Login"; import About from "./components/About"; import Signup from "./components/Signup"; import Error from "./components/Error"; +import Profile from "./components/Profile" import ForgotPswd from "./components/ResetPassword" import { BrowserRouter as Router, Route, Switch, Redirect } from 'react-router-dom'; @@ -20,6 +21,7 @@ function App() { + diff --git a/src/components/Profile.js b/src/components/Profile.js new file mode 100644 index 0000000..683c982 --- /dev/null +++ b/src/components/Profile.js @@ -0,0 +1,61 @@ +import React from "react"; +import Header from "../components/Header"; +import { useHistory } from "react-router-dom"; +import { useAuth } from "../auth/Auth"; + +const Profile = () => { + const { currentUser, logout } = useAuth(); + const history = useHistory(); + + async function handleLogout() { + try { + await logout(); + history.push("/"); + } catch (error) { + alert(error); + } + } + + return ( +
+
+
+
+
+
+ Profile Picture +
+
+
+

+ {currentUser.displayName} +

+ + + + + + + +
Email{currentUser.email}
+ {/*
+ +
*/} +
+
+
+
+
+ ); +}; + +export default Profile; From 93ad890d6807036fc136a66266f3283deecc6c3d Mon Sep 17 00:00:00 2001 From: AntonioWorkman Date: Mon, 26 Apr 2021 15:46:57 -0400 Subject: [PATCH 3/3] fix: modify css naming --- src/components/Profile.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/Profile.js b/src/components/Profile.js index 683c982..75b4ce4 100644 --- a/src/components/Profile.js +++ b/src/components/Profile.js @@ -15,30 +15,30 @@ const Profile = () => { alert(error); } } - + return (
-
-
-
-
+
+
+
+
Profile Picture

-
-

+
+

{currentUser.displayName}

- +
- - + +
Email{currentUser.email}Email{currentUser.email}