mailer implemented

This commit is contained in:
Owen Rees
2023-06-21 14:11:16 +02:00
parent 5fd8b35762
commit b323d07d12
11 changed files with 220 additions and 56 deletions
+23
View File
@@ -0,0 +1,23 @@
import { ChangeEvent, useState } from "react";
const useContactForm = () => {
const [values, setValues] = useState({
email: "",
subject: "",
message: "",
});
const handleChange = (
e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>
) => {
setValues((prevState) => {
return {
...prevState,
[e.target.id]: e.target.value,
};
});
};
return { values, handleChange };
};
export default useContactForm;
+2
View File
@@ -1,3 +1,5 @@
// TODO is this really a hook? I think it is more of a util function
interface HamburgerClose {
menuVisible: boolean;
setMenuVisible: Dispatch<SetStateAction<boolean>>;