This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
Lateinicus/frontend/src/containers/Application.ts

25 lines
623 B
TypeScript
Raw Normal View History

2018-09-18 16:59:15 +00:00
import { connect } from "react-redux";
import { IUser } from "../models/user";
import Application from "../components/app";
import { setAuthenticated, setUser } from "../actions";
const mapStateToProps = state => {
return {
authenticated: state.authenticated,
};
2018-09-18 16:59:15 +00:00
};
const mapDispatchToProps = dispatch => {
return {
setAuthenticated: (status: boolean) => dispatch(setAuthenticated(status)),
setUser: (user: IUser) => dispatch(setUser(user)),
};
};
const ApplicationContainer = connect(mapStateToProps,
mapDispatchToProps)(Application);
export default ApplicationContainer;