Updated the Donation page's handleFormSubmit function to upload images to the Firebase storage and Donations to the Firestore FB.
Added submit state to display Loader while attempting to upload donation data.
If there are images included in the donation form, it creates a FileList containing each image file, uploads it to firebase storage, and returns an array containing the image IDs.
Creates a newDonation object containing all the relevant fields from the FormData, including the imageId array, and passed it to the addDonation function.
If successful, routes to the browse/home page. (Do we want to create a successful donation page/notification?)
If it fails displays a toaster notification letting user know that submission failed.
Added metadata to imageUploads function to ensure correct file type is recognized in firebase storage.
Adjusted addDonation function so donation and donationDetails references refer to a unique document ID.
Updated the Donation page's handleFormSubmit function to upload images to the Firebase storage and Donations to the Firestore FB.
Added metadata to imageUploads function to ensure correct file type is recognized in firebase storage.
Adjusted addDonation function so donation and donationDetails references refer to a unique document ID.