Skip to content

Commit

Permalink
Fix the phone submission hander in event form
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavberi committed Mar 25, 2024
1 parent 8b75d64 commit 6eb04f3
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/components/events/EventForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,22 +184,12 @@ export default function EventForm({
});
res = await res.json();

if (res.ok) {
// show success toast & redirect to manage page
triggerToast({
title: "Success!",
messages: ["Profile saved."],
severity: "success",
});
router.push(`/profile/${defaultValues.uid}`);
router.refresh();
} else {
if (!res.ok) {
// show error toast
triggerToast({
...res.error,
severity: "error",
});
setLoading(false);
}
},
};
Expand Down Expand Up @@ -259,7 +249,6 @@ export default function EventForm({
const phoneData = {
uid: formData.poc,
phone: formData.poc_phone,
img: null,
};
submitHandlers["phone"](phoneData);
}
Expand Down

0 comments on commit 6eb04f3

Please sign in to comment.