mirror of
https://github.com/Telecominfraproject/wlan-cloud-ui.git
synced 2025-10-30 02:12:39 +00:00
redux setup
This commit is contained in:
22
app/containers/App/components/RouteWithLayout.js
Normal file
22
app/containers/App/components/RouteWithLayout.js
Normal file
@@ -0,0 +1,22 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user