summaryrefslogtreecommitdiff
path: root/src/core/components/layouts/AppLayout.jsx
blob: ec61ca06066f9abcf1d95ef0b21d75f0bb989a3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import dynamic from 'next/dynamic';
import AnimationLayout from './AnimationLayout';

const AppBar = dynamic(() => import('../elements/Appbar/Appbar'), {
  ssr: false,
});
const BasicFooter = dynamic(() => import('../elements/Footer/BasicFooter'), {
  ssr: false,
});

const AppLayout = ({ children, title, withFooter = true }) => {
  return (
    <div className='flex flex-col min-h-screen max-h-screen overflow-y-auto'>
      <AppBar title={title} />
      <div className='flex-grow p-4'>{children}</div>
      {withFooter && (
        <div className='mt-auto'>
          <BasicFooter />
        </div>
      )}
    </div>
  );
};

export default AppLayout;