1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

intial commit

This commit is contained in:
muerwre 2019-04-01 15:50:09 +07:00
parent 1d82241d2c
commit 44e10599d7
25 changed files with 17375 additions and 0 deletions

48
src/containers/App.tsx Normal file
View file

@ -0,0 +1,48 @@
import * as React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { hot } from 'react-hot-loader';
import { SomeComponent } from '$components/SomeComponent';
import { ConnectedRouter } from "connected-react-router";
import { history } from "$redux/store";
import { NavLink, Switch, Route } from 'react-router-dom';
interface IAppProps {}
interface IAppState {}
class Component extends React.Component<IAppProps, IAppState> {
state = { };
render() {
return (
<ConnectedRouter history={history}>
<div>
<div>
<NavLink exact to="/" activeClassName="active">
Root
</NavLink>
<NavLink to="/somepath" activeClassName="active">
Something
</NavLink>
</div>
<Switch>
<Route
exact
path="/"
component={SomeComponent}
/>
<Route
path="/somepath"
component={SomeComponent}
/>
</Switch>
</div>
</ConnectedRouter>
);
}
}
const mapStateToProps = (state, props) => ({ });
const mapDispatchToProps = (dispatch) => bindActionCreators({}, dispatch);
export default connect(mapStateToProps, mapDispatchToProps)(hot(module)(Component));