Started the Firebase Integration. Users Register and Login done

This commit is contained in:
2021-09-25 22:24:25 -03:00
parent 644fe59e77
commit 04ce4facaf
10 changed files with 1592 additions and 7 deletions

View File

@@ -0,0 +1,31 @@
import React, {useState} from 'react'
import {firebase} from './Firebase/firebase'
import {getAuth, onAuthStateChanged} from 'firebase/auth'
const Account = () => {
const [signIn, setSignIn] = useState('false')
const auth = getAuth()
onAuthStateChanged(auth, (user) => {
if (user) {
setSignIn(true)
} else {
setSignIn(false)
}
})
return (
<div>
{
signIn ?
<h1>Insert your Clockify API here</h1> :
<h1>Sign in before access to this page...</h1>
}
</div>
)
}
export default Account