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;