2018-11-23 15:23:41 -08:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { withRouter } from 'react-router-dom';
|
|
|
|
import { RouterComponent } from './router';
|
|
|
|
import type { AppState } from '../types/app-state';
|
|
|
|
|
|
|
|
const mapStateToProps = (state: AppState) => ({
|
|
|
|
todos: state.todos,
|
|
|
|
});
|
|
|
|
|
2018-12-03 11:27:56 -08:00
|
|
|
export const Router = withRouter(
|
|
|
|
connect(
|
|
|
|
mapStateToProps,
|
|
|
|
null,
|
|
|
|
)(RouterComponent),
|
|
|
|
);
|