export default withRouter(
connect(
mapStateToProps,
mapDispatchToProps
)(LoginPageContainer)
);const { history } = this.props;
if (history) history.push("/messages");export default compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps)(LoginPageContainer)
);if (history) history.push("/messages");if (history) {
history.push("/messages");
}