BasicLayout.js 477 Bytes
Newer Older
duanledexianxianxian's avatar
init  
duanledexianxianxian committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
import React from 'react';
import HomeLayout from './HomeLayout';
import BlankLayout from './BlankLayout';


const Index = (props) => {
  console.log(props);
  const item = props.route.routes.find(x => props.location.pathname === x.path);
  if (item && item.isFull) {
    console.log('full layout');
    return <BlankLayout>{props.children}</BlankLayout>;
  }

  return (
    <>
      <HomeLayout {...props}>{props.children}</HomeLayout>
    </>
  );
};

export default Index;