RC-4: corrected layout2 components
This commit is contained in:
@@ -5,6 +5,7 @@ import i18next from 'i18next';
|
||||
import { memo, useContext } from 'react';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { useRoutes } from 'react-router-dom';
|
||||
import { useAuth } from 'src/app/auth/AuthContext';
|
||||
import FooterLayout2 from './components/FooterLayout2';
|
||||
import HeaderLayout2 from './components/HeaderLayout2';
|
||||
|
||||
@@ -14,12 +15,13 @@ i18next.addResourceBundle('en', 'layout2', en);
|
||||
|
||||
function Layout2(props) {
|
||||
const config = useSelector(selectFuseCurrentLayoutConfig);
|
||||
const authContext = useAuth();
|
||||
const appContext = useContext(AppContext);
|
||||
const { routes } = appContext;
|
||||
|
||||
return (
|
||||
<>
|
||||
{config.header.display && <HeaderLayout2 />}
|
||||
{config.header.display && <HeaderLayout2 isAuthenticated={authContext.isAuthenticated} />}
|
||||
<main id="fuse-main" className="flex flex-col min-h-full min-w-full mt-72">
|
||||
<FuseSuspense>{useRoutes(routes)}</FuseSuspense>
|
||||
{props.children}
|
||||
|
||||
Reference in New Issue
Block a user