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