mirror of
https://github.com/FranP-code/Pomodoro-Timer-with-Clockify-integration.git
synced 2025-10-12 23:52:30 +00:00
Added folders and disabled login banner when the user is identificated
This commit is contained in:
@@ -1,17 +1,44 @@
|
||||
import React from 'react'
|
||||
import React, {useState} from 'react'
|
||||
import {firebase} from './Firebase/firebase'
|
||||
import {getAuth, onAuthStateChanged} from 'firebase/auth'
|
||||
import { doc, updateDoc, getFirestore, collection, getDoc } from "firebase/firestore";
|
||||
|
||||
const BannerLogin = () => {
|
||||
|
||||
console.log('BANNER LOGIN DEPLOYED')
|
||||
|
||||
const [signIn, setSignIn] = useState('')
|
||||
|
||||
const auth = getAuth()
|
||||
|
||||
onAuthStateChanged(auth, (user) => {
|
||||
|
||||
if (user) {
|
||||
setSignIn(true)
|
||||
} else {
|
||||
setSignIn(false)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
return (
|
||||
<div className="banner-login">
|
||||
<p>Access to integrate and save your progress with Clockify!</p>
|
||||
<div className="button-container">
|
||||
<button className="register" onClick={() => {window.location = '/identify?act=r'}}>Register</button>
|
||||
<button className="login" onClick={() => {window.location = '/identify?act=l'}}>Login</button>
|
||||
</div>
|
||||
</div>
|
||||
<>
|
||||
{
|
||||
!signIn ?
|
||||
|
||||
<div className="banner-login">
|
||||
<p>Access to integrate and save your progress with Clockify!</p>
|
||||
<div className="button-container">
|
||||
<button className="register" onClick={() => {window.location = '/identify?act=r'}}>Register</button>
|
||||
<button className="login" onClick={() => {window.location = '/identify?act=l'}}>Login</button>
|
||||
</div>
|
||||
</div>
|
||||
: <div className="banner-login blank">
|
||||
|
||||
</div>
|
||||
}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import React, {useState} from 'react'
|
||||
import DarkMode from './DarkMode'
|
||||
import HeaderButton from './HeaderButton'
|
||||
import DarkMode from './Header Childrens/DarkMode'
|
||||
|
||||
const Header = () => {
|
||||
//<HeaderButton/>
|
||||
|
||||
console.log("HEADER DEPLOYED")
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import StyleSelectionChildren from './StyleSelectionChildren'
|
||||
import StyleSelectionChildren from './Style Selector Children/StyleSelectionChildren'
|
||||
|
||||
const StyleSelector = (props) => {
|
||||
return (
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, {useState} from 'react'
|
||||
import MainPomodoroTimer, {setTim} from './MainPomodoroTimer'
|
||||
import PomodoroCounter from './PomodoroCounter'
|
||||
import StyleSelector from './StyleSelector'
|
||||
import MainPomodoroTimer, {setTim} from './Main Pomodoro Childrens/MainPomodoroTimer'
|
||||
import PomodoroCounter from './Main Pomodoro Childrens/PomodoroCounter'
|
||||
import StyleSelector from './Main Pomodoro Childrens/StyleSelector'
|
||||
|
||||
const MainPomodoro = () => {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user