import React, {Component} from 'react' import {withRouter, Route, Switch} from 'react-router-dom' import Shop from './shop' import Goods from './goods' import Orders from './orders' import Admin from './admin' class Manage extends Component { constructor(props) { super(props) this.state = { page: '' } } componentWillMount() { let {location} = this.props if (location && location.state) { this.props.history.replace({ pathname: '/my/manage/' + location.state.page, state: {} }) } } render() { return (