/** * Github demo * @author yoyoyohamapi * @ignore created 2018-07-17 20:24:38 */ import * as React from 'react' import { connect } from 'react-redux' import { Route, Redirect } from 'react-router' import { Link } from 'react-router-dom' import { ConnectedRouter, RouterState } from 'connected-react-router' import { Layout, Menu } from 'antd' import createHistory from 'history/createHashHistory' import User from '@modules/user' import Repo from '@modules/repo' interface Props { path: string } const history = createHistory() const { Header, Content, Footer } = Layout class App extends React.Component { render() { const { path } = this.props return (
Users Repos
} />
) } } const mapStateToProps = ({router}: {router: RouterState}): Props => ({ path: router.location.pathname }) export default connect(mapStateToProps)(App)