-
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
1 parent
3bca7d4
commit dd2f972
Showing
10 changed files
with
50 additions
and
1,026 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,28 +1,25 @@ | ||
import { Outlet } from 'react-router-dom' | ||
import useAuth from '../hooks/useAuth' | ||
import PublicHeader from './PublicHeader' | ||
import { ToastContainer } from 'react-toastify' | ||
import PublicFooter from './PublicFooter' | ||
import { Outlet } from "react-router-dom"; | ||
import useAuth from "../hooks/useAuth"; | ||
import PublicHeader from "./PublicHeader"; | ||
import { ToastContainer } from "react-toastify"; | ||
import PublicFooter from "./PublicFooter"; | ||
|
||
const Layout = () => { | ||
const { volunId, role } = useAuth(); | ||
|
||
const {volunId, role}= useAuth() | ||
const displayPublic = !volunId && !role; | ||
|
||
const displayPublic = !volunId && !role | ||
return ( | ||
<body className="public_layout"> | ||
{displayPublic && <PublicHeader />} | ||
<main className="public_layout"> | ||
|
||
return ( | ||
|
||
<body className='d-flex flex-column min-vh-100'> | ||
{displayPublic && <PublicHeader/>} | ||
<main className=' flex-grow-1'> | ||
<ToastContainer/> | ||
|
||
<Outlet/> | ||
</main> | ||
|
||
|
||
{displayPublic && <PublicFooter/>} | ||
</body> | ||
) | ||
} | ||
export default Layout | ||
<ToastContainer /> | ||
<Outlet /> | ||
</main> | ||
|
||
{displayPublic && <PublicFooter />} | ||
</body> | ||
); | ||
}; | ||
export default Layout; |
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
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
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
Oops, something went wrong.