Fix Image loading issue

This commit is contained in:
Ray 2023-12-04 13:22:35 +00:00 committed by GitHub
parent 0fa0353c05
commit 58b4e6cbe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 4 deletions

View File

@ -10,7 +10,7 @@ export function ItemImage ( props ) {
useEffect( () => {
if( props.source ) {
const imgref = ref( storage, `book_covers/${props.source}`)
const imgref = ref( storage, `artworks/${props.source}`)
getDownloadURL( imgref )
.then( (url) => setImage(url) )
.catch( err => console.log(err) )

View File

@ -32,12 +32,10 @@ export function Detail(props) {
<ItemImage source={artworkData.artwork_image} />
</Col>
<Col md={6}>
<h2>More information</h2>
<h3>Artwork description</h3>
<p>{artworkData.summary}</p>
<h3>Author</h3>
<p>systie</p>
</Col>
</Row>
<Row>

View File

@ -22,7 +22,7 @@ export function Home(props) {
<Card key={itemkey} className="position-relative">
<a href={itemLink} className="position-absolute" style={{top:0, left:0, right:0, bottom:0}}>
</a>
<ItemImage source={ artwork.cover_image} />
<ItemImage source={ artwork.artwork_image} />
<Card.Body>
<Card.Title>{ artwork.artwork_title }</Card.Title>
</Card.Body>