From 5623e7b53562e496ec526cf47abefd6108b0b8f0 Mon Sep 17 00:00:00 2001 From: Caelum Dudek Date: Wed, 31 Jul 2024 11:39:26 -0700 Subject: [PATCH] Fixed charities posting --- apps/frontend/src/pages/CreateCharity.tsx | 30 ++++------------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/apps/frontend/src/pages/CreateCharity.tsx b/apps/frontend/src/pages/CreateCharity.tsx index a9393c28..e2f1585e 100644 --- a/apps/frontend/src/pages/CreateCharity.tsx +++ b/apps/frontend/src/pages/CreateCharity.tsx @@ -81,11 +81,14 @@ const CreateCharity = () => { imageUrl: "", organizations: [], }); + setPartnerImages([]); + setLogoImage(null); + setLogoImageString(undefined); } else { alert("Charity Creation Failed"); } } catch (error) { - alert("Charity Creation Failed"); + alert("Charity Creation Failed, did you attach images to everything?"); console.error(error); } } else { @@ -306,7 +309,7 @@ const CreateCharity = () => { listingIndex: number, ) => { const index = indexFromKey(key, listingIndex); - if (index !== -1) { + if (index !== -1 && +event.target.value < 9999999) { updateOrganizationPayload( index, "donated", @@ -683,29 +686,6 @@ const CreateCharity = () => { > Create Charity Event -