Skip to content

Instantly share code, notes, and snippets.

@sAbakumoff
Created November 30, 2016 08:10
Show Gist options
  • Save sAbakumoff/9dcb13e1a405a3a942dcbcfc70c017ac to your computer and use it in GitHub Desktop.
Save sAbakumoff/9dcb13e1a405a3a942dcbcfc70c017ac to your computer and use it in GitHub Desktop.
import TWBLogin from './TWBLoginComponent'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import { TWBLoginFormOptions } from 'shared/utils/forms'
class LoginHandler extends Component {
render () {
const { dispatch, _T } = this.props
const title = _T('title.twblogin')
const defaultTitle = _T('title.site')
return (
<div>
<Helmet title={`${title} | ${defaultTitle}`} />
<TWBLogin
{...bindActionCreators(AuthActions, dispatch)}
{...this.props}
options={TWBLoginFormOptions(this.props.defaultLocale)} />
</div>
)
}
}
export default connect(state => ({
auth: state.auth
}))(connectI18n(locale => ({
options: TWBLoginFormOptions(locale)
}))(LoginHandler))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment