This repository has been archived by the owner on Aug 30, 2023. It is now read-only.
forked from chingu-voyages/v8-geckos-team-07
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,16 @@ | ||
import React, { Component } from 'react'; | ||
import Layout from '../containers/Layout'; | ||
import SocialButtonList from './SocialButtonList'; | ||
import { auth } from '../firebase'; | ||
import StyledFirebaseAuth from 'react-firebaseui/StyledFirebaseAuth'; | ||
// import './firebaseui-styling.global.css'; // Import globally. | ||
|
||
import Header from '../components/header'; | ||
import Footer from '../components/footer'; | ||
|
||
|
||
|
||
const buttonList = { | ||
google: { | ||
visible: true, | ||
provider: () => { | ||
const provider = auth.googleOAuth(); | ||
provider.addScope('profile'); | ||
provider.addScope('email'); | ||
return provider; | ||
} | ||
}, | ||
}; | ||
|
||
class Login extends Component { | ||
componentDidMount() { | ||
auth.getAuth().onAuthStateChanged(user => { | ||
if (user) { | ||
this.props.history.push('/dashboard'); | ||
} | ||
}); | ||
} | ||
|
||
render() { | ||
return ( | ||
<div> | ||
<Header /> | ||
<div className="circle"> | ||
<h2>A simple way to measure whether you did a habit.</h2> | ||
<ol> | ||
<li>Sign in using Google</li> | ||
<li>Create a habit to track</li> | ||
<li>Check in to relfect and log your progress</li> | ||
<li>Review your data to help you along your journey</li> | ||
</ol> | ||
|
||
<p>Happy Tracking!</p> | ||
|
||
<SocialButtonList buttonList={buttonList} auth={auth.getAuth}/> | ||
</div> | ||
<Footer /> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
import React from 'react'; | ||
|
||
const Login = (props) => ( | ||
<div className="circle"> | ||
<h2>A simple way to measure whether you did a habit.</h2> | ||
<ol> | ||
<li>Sign in using Google</li> | ||
<li>Create a habit to track</li> | ||
<li>Check in to reflect and log your progress</li> | ||
<li>Review your data to help you along your journey</li> | ||
</ol> | ||
<p>Happy Tracking!</p> | ||
</div> | ||
); | ||
|
||
export default Login; |