2024-01-04 19:30:10 +03:00
|
|
|
import { Outlet } from 'react-router-dom';
|
|
|
|
|
|
|
|
import ConceptToaster from '@/app/ConceptToaster';
|
|
|
|
import Footer from '@/app/Footer';
|
|
|
|
import Navigation from '@/app/Navigation';
|
2024-06-26 19:47:31 +03:00
|
|
|
import { useConceptOptions } from '@/context/ConceptOptionsContext';
|
2024-01-04 19:30:10 +03:00
|
|
|
import { NavigationState } from '@/context/NavigationContext';
|
2024-03-27 15:32:59 +03:00
|
|
|
import { globals } from '@/utils/constants';
|
2024-01-04 19:30:10 +03:00
|
|
|
|
|
|
|
function ApplicationLayout() {
|
2024-04-01 19:07:20 +03:00
|
|
|
const { viewportHeight, mainHeight, showScroll } = useConceptOptions();
|
2024-01-04 19:30:10 +03:00
|
|
|
return (
|
|
|
|
<NavigationState>
|
2024-06-02 23:41:46 +03:00
|
|
|
<div className='min-w-[20rem] clr-app antialiased'>
|
2024-01-04 19:30:10 +03:00
|
|
|
<ConceptToaster
|
|
|
|
className='mt-[4rem] text-sm' // prettier: split lines
|
|
|
|
autoClose={3000}
|
|
|
|
draggable={false}
|
|
|
|
pauseOnFocusLoss={false}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Navigation />
|
|
|
|
|
|
|
|
<div
|
2024-03-27 15:32:59 +03:00
|
|
|
id={globals.main_scroll}
|
2024-06-05 13:00:28 +03:00
|
|
|
className='flex flex-col items-start overflow-x-auto max-w-[100vw]'
|
2024-01-04 19:30:10 +03:00
|
|
|
style={{
|
2024-06-05 13:00:28 +03:00
|
|
|
maxHeight: viewportHeight
|
2024-01-04 19:30:10 +03:00
|
|
|
}}
|
|
|
|
>
|
2024-06-05 13:00:28 +03:00
|
|
|
<main
|
|
|
|
className='w-full cc-scroll-y'
|
|
|
|
style={{ overflowY: showScroll ? 'scroll' : 'auto', minHeight: mainHeight }}
|
|
|
|
>
|
2024-01-04 19:30:10 +03:00
|
|
|
<Outlet />
|
|
|
|
</main>
|
|
|
|
<Footer />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</NavigationState>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ApplicationLayout;
|