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 (
    <>
      <AnimationLayout>
        <AppBar title={title} />
        {children}
      </AnimationLayout>
      {withFooter && <BasicFooter />}
    </>
  );
};

export default AppLayout;
