import React from 'react' import Page from './page'; import { ExtendedUserForm as UserForm } from '../components/UserForm'; import { connect } from 'react-redux'; import { createUser } from '../actions/user.actions'; export class HomePage extends React.PureComponent { render() { const { createUserFormError } = this.props; const onUserFormSubmit = ({ username, password }) => { this.props.dispatch(createUser(username, password)); }; return (

Bienvenue sur PleaseWait !

Le gestionnaire de ticket simplifié.

Se déconnecter
); } } function transformErrorCode(code) { switch (code) { case 0: return { username: { hasError: true, message: "Le nom d'utilisateur ne peut pas être vide. (API)" } } default: return null; } } function mapStateToProps({ users }) { return { createUserFormError: transformErrorCode(users.createUserForm.errorCode), } } export const ConnectedHomePage = connect(mapStateToProps)(HomePage)