|
|
@@ -4,7 +4,6 @@ import Overview from "../../components/Overview/overview";
|
|
|
import Stocks from "../../components/StocksApi/stocks";
|
|
|
import IndexApi from "../../components/IndexApi/indexApi";
|
|
|
import indexBasicInfo from "../../components/indexBasicInfo/indexBasicInfo";
|
|
|
-
|
|
|
import { Link } from "react-router-dom";
|
|
|
import stocksApiList from "../../StocksApiList";
|
|
|
import indexApiList from "../../IndexApiList";
|
|
|
@@ -29,7 +28,7 @@ export default class NavBar extends Component {
|
|
|
// let { match } = this.props;
|
|
|
return (
|
|
|
<Layout style={{ minHeight: "100vh" }}>
|
|
|
- <Header className="header"></Header>
|
|
|
+ <Header className="header">BoNiu</Header>
|
|
|
<Layout>
|
|
|
<Sider width={200} className="site-layout-background">
|
|
|
<Menu
|
|
|
@@ -62,7 +61,7 @@ export default class NavBar extends Component {
|
|
|
{indexApiList.map((item) => {
|
|
|
return (
|
|
|
<Menu.Item key={item.key}>
|
|
|
- <Link to={item.url}>{item.name}</Link>
|
|
|
+ <Link to={{pathname: item.url, state: item.data}}>{item.name}</Link>
|
|
|
</Menu.Item>
|
|
|
);
|
|
|
})}
|
|
|
@@ -79,10 +78,10 @@ export default class NavBar extends Component {
|
|
|
}}
|
|
|
>
|
|
|
<Switch>
|
|
|
- <Route exact path="/overview" component={Overview} />
|
|
|
+ <Route exact path="/" component={Overview} />
|
|
|
+ <Route path="/overview" component={Overview} />
|
|
|
<Route path="/stocks" component={Stocks} />
|
|
|
- <Route path="/indexApi" component={IndexApi} />
|
|
|
- <Route path="/indexBasicInfo" component={indexBasicInfo} />
|
|
|
+ <Route path="/indexApi" component={indexBasicInfo} />
|
|
|
</Switch>
|
|
|
</Content>
|
|
|
</Layout>
|