Skip to content

Commit

Permalink
Update src/components/personal-info.jsx
Browse files Browse the repository at this point in the history
Co-authored-by: Ahmed Saed <37080003+Ahmedsaed@users.noreply.github.com>
  • Loading branch information
Epic-Eric and Ahmedsaed authored Jun 28, 2024
1 parent d5ce5c7 commit 84e15e0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/components/personal-info.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ function PersonalInfo() {
setUserInfo({...userInfo, [e.target.name]: e.target.value})
}

const handleSubmit = async (e) => {
e.preventDefault();

try {
const response = await axios.post("/resume/personal", //update the route after it's implemented in the backend
...userInfo);
console.log(`user info added with ID: ${response.data.id}`);
navigateTo("mainMenu");
} catch (error) {
console.error("Error adding user info:", error);
alert("Failed to add user info.");
}
};
return (

<form className="resumeSection">
Expand Down

0 comments on commit 84e15e0

Please sign in to comment.