mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 04:26:57 +00:00
mailer implemented
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user