Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.