I'm using Cloud Firestore (Database) and Cloud Storage (Image storage), but I'm not sure exactly how to display images.
Questions:
- Am I loading this correctly in Cloud Firestore?
- Am I missing something with the Access token?
Process/Steps Taken:
- I manually loaded each image to Firebase Cloud Storage
- I then took the storage location of each image and applied it to the necessary object in my JSON file, which looks like this
"agency_logo": "gs://PROJECT_NAME_HERE.appspot.com/logos/CityLogo1.png",
- Now that I have all of the images mapped correctly in the JSON file and loaded, I'm mapping the imported JSON to the
AgencyCard
React component:
// Render Logos
const renderLogos = () => {
return images.logos.map((logo, i) => (
<AgencyCard
key={i}
agencyName={logo.agency_name}
agencyLogo={logo.agency_logo}
/>
));
};
- Here's how the image is passed down to props:
<div id="agency-image-container">
<img id="agency-image" src={props.agencyLogo} />
</div>
- What is rendering as the image: