import React, { Component } from "react"; import "./Contact-us.css"; import axios from 'axios' import { FieldFeedback, FieldFeedbacks, FormWithConstraints } from 'react-form-with-constraints'; import Alert from 'react-bootstrap/Alert'; import { withTranslation } from "react-i18next"; class ContactUs extends Component { constructor(props) { super(props); this.state = { firstname: "", lastname: "", email: "", message: "", agent: "", house: "", alertBad: false, alertSucess: false, time: false }; } render() { const { t } = this.props; return (
this.setState({ alertBad: false })} dismissible> {t("Danger1")}

{t("Danger2")}

this.setState({ alertSucess: false })} dismissible> {t("Success1")}

{t("Success2")}

{t("Contact-Title")}

this.form = form} id="contact-form" onSubmit={this.handleSubmit.bind(this)} method="POST" noValidate >
{t("Contact-Error1")}
{t("Contact-Error1")}
{t("Contact-Error2")}
{t("Contact-Error2")}
value.length === 0}>{t("Contact-Error2")} !/\S+@\S+/.test(value)}>{t("Contact-Error3")}