import React from 'react' import { useTranslation } from 'react-i18next' import { Helmet } from 'react-helmet' import { history } from '../../index' import { isRegistrationAllowed } from '../../utils' export default function Form(props) { const { t } = useTranslation() const pageTitle = `common:${props.formType .charAt(0) .toUpperCase()}${props.formType.slice(1)}` return (
FitTrackee - {t(`user:${props.formType}`)}

{t(pageTitle)}



{props.formType === 'register' && !isRegistrationAllowed ? (
Registration is disabled.
) : (
props.handleUserFormSubmit(event, props.formType) } > {props.formType === 'register' && (
)}
{props.formType === 'register' && (
)}
)}
) }