Portal/rsconcept/frontend/src/app/ApplicationLayout.tsx

42 lines
1.2 KiB
TypeScript
Raw Normal View History

2024-06-07 20:17:03 +03:00
import { Outlet } from 'react-router-dom';
import ConceptToaster from '@/app/ConceptToaster';
import Footer from '@/app/Footer';
import Navigation from '@/app/Navigation';
import { useConceptOptions } from '@/context/ConceptOptionsContext';
2024-06-07 20:17:03 +03:00
import { NavigationState } from '@/context/NavigationContext';
import { globals } from '@/utils/constants';
function ApplicationLayout() {
const { viewportHeight, mainHeight, showScroll } = useConceptOptions();
return (
<NavigationState>
2024-09-23 10:33:47 +03:00
<div className='min-w-[20rem] clr-app antialiased h-full max-w-[120rem] mx-auto'>
2024-06-07 20:17:03 +03:00
<ConceptToaster
2024-08-24 19:40:54 +03:00
className='mt-[4rem] text-[14px]' // prettier: split lines
2024-06-07 20:17:03 +03:00
autoClose={3000}
draggable={false}
pauseOnFocusLoss={false}
/>
<Navigation />
<div
id={globals.main_scroll}
2024-08-24 11:20:49 +03:00
className='overflow-x-auto max-w-[100vw]'
2024-06-07 20:17:03 +03:00
style={{
maxHeight: viewportHeight
}}
>
2024-09-21 20:03:49 +03:00
<main className='cc-scroll-y' style={{ overflowY: showScroll ? 'scroll' : 'auto', minHeight: mainHeight }}>
2024-06-07 20:17:03 +03:00
<Outlet />
</main>
<Footer />
</div>
</div>
</NavigationState>
);
}
export default ApplicationLayout;