-
Notifications
You must be signed in to change notification settings - Fork 4
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
23 new donated item form #33
Conversation
); | ||
}; | ||
|
||
export default NewItemForm; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is same as donor form, this NewItemForm file should be imported in the home, or else both donor form and donated item from should be integrated. Separate routes should be created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, two separate tsx files should be written for donor form and donated item form, and image upload option should be implemented in the backend option as well. as multiple images are being uploaded, we need to use an array of objects. The file handling function looks fine and form validators with error messages are neat. The donor should be able to have more options to donate.
@@ -0,0 +1,285 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a new button Donated Item
in the navbar beside the Donor Form
. And then create a new route path /addDonatedItem
and route it to this newly added component NewItemForm
if (validateForm()) { | ||
try { | ||
const response = await axios.post( | ||
`${process.env.REACT_APP_BACKEND_API_BASE_URL}donor`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update the donor
endpoint with donatedItem
@@ -0,0 +1,286 @@ | |||
import React, { useState, ChangeEvent, FormEvent } from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@truffer11 rename the file to DonatedItemForm.tsx
**Fixes Issue #23 **
What was changed?
Why was it changed?
How was it changed?
Screenshots that show the changes (if applicable):