Skip to content
Snippets Groups Projects
Commit 83c60fff authored by Ganapathi Subramanyam  Jayam's avatar Ganapathi Subramanyam Jayam :dart:
Browse files

Merge branch 'logoutfix' into 'master'

logoutfix

See merge request !34
parents ce7df0e0 823884f7
No related branches found
No related tags found
1 merge request!34logoutfix
This diff is collapsed.
......@@ -23,14 +23,13 @@ const Routes = () => {
}
})
}
useEffect(() => {
authListener()
}, [])
const handleLogout = () => {
fire.auth().signOut()
//this.props.history.push('/')
}
// const handleLogout = () => {
// fire.auth().signOut()
// //this.props.history.push('/')
// }
return (
<BrowserRouter>
<section className='hero'>
......@@ -38,10 +37,9 @@ const Routes = () => {
<Navbar.Brand as={Link} to='/'>
<h2>Course File System</h2>
</Navbar.Brand>
{user && (
<Link to="/">
<button className='logoutbutton' onClick={()=>handleLogout}>
<Link to="/signin">
<button className='logoutbutton' onClick={()=>fire.auth().signOut()}>
Logout
</button></Link>
)}
......
......@@ -36,7 +36,7 @@ const Hero = ({ handleLogout }) => {
<div className='d-flex align-items-center'>
<FolderNav currentFolder={folder} />
<AddFolder currentFolder={folder} />
{childFolders.length == 0 && folder.id == null && (
{childFolders.length == 0 && folder.id != null && (
<Deffolders currentFolder={folder} />
)}
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment