import React from 'react';
import { Layout } from 'antd';
import { Outlet } from "react-router-dom";
import PageTransition from './PageTransition';
import Footer from './Footer';

const { Content } = Layout;
const style = {
  margin: '24px',
  marginTop: 0,
  flexGrow: 1,
};

export default (props) => {
  const { noFooter } = props;

  return (
    <div className='layout-container'>
      <Content style={style}>
        <PageTransition>
          <Outlet />
        </PageTransition>
      </Content>
      {!noFooter && <Footer />}
    </div>
  )
}
