49 lines
1.6 KiB
TypeScript
49 lines
1.6 KiB
TypeScript
"use client";
|
|
|
|
import ContentAnimation from '@/components/layouts/content-animation';
|
|
import Footer from '@/components/layouts/footer';
|
|
import Header from '@/components/layouts/header';
|
|
import MainContainer from '@/components/layouts/main-container';
|
|
import Overlay from '@/components/layouts/overlay';
|
|
import ScrollToTop from '@/components/layouts/scroll-to-top';
|
|
import Setting from '@/components/layouts/setting';
|
|
import Sidebar from '@/components/layouts/sidebar';
|
|
import Portals from '@/components/portals';
|
|
import withAuth from '@/hoc/withAuth';
|
|
import { FC } from 'react';
|
|
|
|
const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => {
|
|
|
|
return (
|
|
<>
|
|
{/* BEGIN MAIN CONTAINER */}
|
|
<div className="relative">
|
|
<Overlay />
|
|
<ScrollToTop />
|
|
|
|
<MainContainer>
|
|
{/* BEGIN SIDEBAR */}
|
|
<Sidebar />
|
|
{/* END SIDEBAR */}
|
|
<div className="main-content flex min-h-screen flex-col">
|
|
{/* BEGIN TOP NAVBAR */}
|
|
<Header />
|
|
{/* END TOP NAVBAR */}
|
|
|
|
{/* BEGIN CONTENT AREA */}
|
|
<ContentAnimation>{children}</ContentAnimation>
|
|
{/* END CONTENT AREA */}
|
|
|
|
{/* BEGIN FOOTER */}
|
|
<Footer />
|
|
{/* END FOOTER */}
|
|
<Portals />
|
|
</div>
|
|
</MainContainer>
|
|
</div>
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default withAuth(DefaultLayout);
|