|
|
@ -3,22 +3,28 @@ import "antd/dist/antd.css";
|
|
|
|
import RouteWithSubRoutes from "./components/RouteWithSubRoutes";
|
|
|
|
import RouteWithSubRoutes from "./components/RouteWithSubRoutes";
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
BrowserRouter as Router,
|
|
|
|
BrowserRouter as Router,
|
|
|
|
Link,
|
|
|
|
Link, Redirect, Switch,
|
|
|
|
} from 'react-router-dom';
|
|
|
|
} from 'react-router-dom';
|
|
|
|
|
|
|
|
|
|
|
|
class App extends React.Component {
|
|
|
|
class App extends React.Component {
|
|
|
|
routes;
|
|
|
|
routes;
|
|
|
|
|
|
|
|
|
|
|
|
constructor(props) {
|
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
super(props);
|
|
|
|
this.routes = props.routes;
|
|
|
|
this.routes = props.routes;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
|
|
|
|
console.log(this.routes);
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Router>
|
|
|
|
<Router>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<Switch>
|
|
|
|
|
|
|
|
<Redirect exact from="/publisher" to="/publisher/dashboard/apps"/>
|
|
|
|
{this.routes.map((route) => (
|
|
|
|
{this.routes.map((route) => (
|
|
|
|
<RouteWithSubRoutes key={route.path} {...route} />
|
|
|
|
<RouteWithSubRoutes key={route.path} {...route} />
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|
|
|
|
|
</Switch>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</Router>
|
|
|
|
</Router>
|
|
|
|
|
|
|
|
|
|
|
|