mirror of
https://github.com/Telecominfraproject/wlan-cloud-ui.git
synced 2025-10-29 09:52:36 +00:00
23 lines
452 B
JavaScript
23 lines
452 B
JavaScript
import React from 'react';
|
|
import T from 'prop-types';
|
|
import { Route } from 'react-router-dom';
|
|
|
|
import MasterLayout from 'containers/MasterLayout';
|
|
|
|
const RouteWithLayout = ({ component: Component, ...rest }) => (
|
|
<Route
|
|
{...rest}
|
|
render={props => (
|
|
<MasterLayout>
|
|
<Component {...props} />
|
|
</MasterLayout>
|
|
)}
|
|
/>
|
|
);
|
|
|
|
RouteWithLayout.propTypes = {
|
|
component: T.func.isRequired,
|
|
};
|
|
|
|
export default RouteWithLayout;
|