Skip to content

Commit

Permalink
Used firebase localstorage to get user account info (#207)
Browse files Browse the repository at this point in the history
* Used firebase localstorage to get user account info

* Removed comment lines
  • Loading branch information
itsercleung authored Apr 26, 2020
1 parent 379e4f7 commit 4868662
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/src/common/Header/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ const Login = ({ handleLogin, displayProfile }) => {

const handleButtonShow = () => {
if (document.cookie) {
const storedPostTypes = JSON.parse(localStorage.getItem('firebaseui::rememberedAccounts'));
if (storedPostTypes) {
handleLogin(true, storedPostTypes[0].displayName, storedPostTypes[0].photoUrl);
}
return null;
}

Expand Down

0 comments on commit 4868662

Please sign in to comment.