Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #45 from huskynz/dev
Browse files Browse the repository at this point in the history
AHHHH EVERYTHING IS BREAKING NOW
  • Loading branch information
Husky-Devel authored Jan 1, 2024
2 parents f457454 + 5a2f237 commit b54b18d
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions components/contact.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from 'react'; // Assuming you're using React
import { toast } from 'react-toastify'; // Assuming you're using a toast notification library
import { FaPaperPlane } from 'react-icons/fa'; // Assuming you're using Font Awesome for icons
import React, { useState, ChangeEvent, FormEvent } from 'react';
import { toast } from 'react-toastify';
import { FaPaperPlane } from 'react-icons/fa';

const ContactForm = () => {
const [formData, setFormData] = useState({
Expand All @@ -9,7 +9,15 @@ const ContactForm = () => {
});
const [pending, setPending] = useState(false);

const handleSubmit = async (event) => {
const handleChange = (event: ChangeEvent<HTMLTextAreaElement | HTMLInputElement>) => {
const { name, value } = event.target;
setFormData((prevFormData) => ({
...prevFormData,
[name]: value
}));
};

const handleSubmit = async (event: FormEvent<HTMLFormElement>) => {
event.preventDefault();
setPending(true);

Expand All @@ -36,14 +44,6 @@ const ContactForm = () => {
}
};

const handleChange = (event) => {
const { name, value } = event.target;
setFormData((prevFormData) => ({
...prevFormData,
[name]: value
}));
};

return (
<form
className="mt-10 flex flex-col dark:text-black"
Expand Down Expand Up @@ -80,4 +80,4 @@ const ContactForm = () => {
);
};

export default ContactForm;
export default ContactForm;

0 comments on commit b54b18d

Please sign in to comment.