Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed charities posting #570

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 5 additions & 25 deletions apps/frontend/src/pages/CreateCharity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -683,29 +686,6 @@ const CreateCharity = () => {
>
Create Charity Event
</Button>
<Button
variant="contained"
sx={{
display: "inline",
mt: 2,
backgroundColor: colors.martletplaceYellow,
"&:hover": {
backgroundColor: colors.martletplaceYellowHover,
},
textTransform: "none",
fontSize: "16px",
padding: "10px 20px",
margin: "10px",
}}
onClick={() => {
alert(
"The Following Object Will be Submitted(Files are uploaded at the end)\n" +
JSON.stringify(newCharityObject, null, 2),
);
}}
>
STATUS
</Button>
</Box>
</form>
</Box>
Expand Down