API Routing
Unanswered
Sloth bear posted this in #help-forum
Sloth bearOP
Hi, i want to be able to use node-mailer and this is part of my contact page and am done with getting my data from the input fields using react-hooks-form am stack with the API routing...
this is my code snippet for the contact from the contact form:
and this is my project structure
this is my code snippet for the contact from the contact form:
"use client";
function Detailed() {
const {
register,
handleSubmit,
reset,
formState: { errors },
} = useForm();
const [loading, setLoading] = useState(false);
async function onSubmit(data) {
setLoading(true);
const contact_data = { ...data }; // Ive stored my data aready here..................................
console.log(contact_data)
}and this is my project structure