meal_planner/src/containers/Contact/index.tsx
Ruidy 0e3b0a7cee
refactoring (#5)
* use tsx

* compile

* refactor Router

* refactor layout

* refactor home container

* refactor meal container

* refactor categories container

* refactor category container

* refactor search and profile container

* refactor
2021-03-28 17:05:46 +02:00

23 lines
641 B
TypeScript

import { FC, useState } from "react";
import PageLayout from "../../layouts/PageLayout";
import { ContactForm } from "../../components/ContactForm";
export const Contact: FC = () => {
const [isSubmitted, setIsSubmitted] = useState(false);
return isSubmitted ? (
<div className="container center-align">
<img
className="responsive-img"
src={require("../../images/mail_sent.svg")}
alt="mail_sent"
width="30%"
/>
<h4>Thank you for your message</h4>
</div>
) : (
<PageLayout title="Contact Us">
<ContactForm setIsSubmitted={setIsSubmitted} />
</PageLayout>
);
};