Created Component for Sub Routes

feature/appm-store/pbac
Jayasanka 6 years ago
parent c7cb3319eb
commit 40e9fbebb8

@ -0,0 +1,20 @@
import React from 'react';
import {Route} from 'react-router-dom';
class RouteWithSubRoutes extends React.Component{
props;
constructor(props){
super(props);
console.log(props);
this.props = props;
}
render() {
return(
<Route path={this.props.path} render={(props) => (
<this.props.component {...props} routes={this.props.routes}/>
)}/>
);
}
}
export default RouteWithSubRoutes;
Loading…
Cancel
Save