Skip to content

Commit

Permalink
Fixed bad merge conflict from rebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcia committed Dec 13, 2024
1 parent c9459bf commit a373c1f
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions frontend/src/components/pages/RequestKit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,6 @@ function RequestKit({ user }) {
window.scrollTo(0, 0);
}, []);

useEffect(() => {
const fetchKitName = async () => {
if (kitId) {
try {
const response = await fetch(`${API_URL}/kits/${kitId}`);
const data = await response.json();
setKitName(data.name);
} catch (error) {
console.error('Error fetching kit name:', error);
}
} else {
setKitName('');
}
};

fetchKitName();
}, [kitId]);

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

Expand All @@ -83,7 +65,7 @@ function RequestKit({ user }) {

try {
// Send POST request to registration endpoint
await validationSchema.validate(formData, { abortEarly: false });
await validationSchema.validate(orderForm, { abortEarly: false });
const response = await fetch(ordersUrl, {
method: "POST",
headers: {
Expand Down

0 comments on commit a373c1f

Please sign in to comment.