import React from 'react';
import { Outlet } from 'react-router-dom';
import useRoute from '@/utils/hooks/useRoute';

const containerStyle = {
  margin: '24px 24px 0 24px',
  height: '100%',
}

export default (props) => {

  const currentRoute = useRoute();
  const style = currentRoute.meta && currentRoute.meta.noLayout ? { height: '100%' } : containerStyle;

  return (
    <div style={style}>
      <Outlet />
    </div>
  )
}
