Fix Image loading issue
This commit is contained in:
parent
0fa0353c05
commit
58b4e6cbe4
|
@ -10,7 +10,7 @@ export function ItemImage ( props ) {
|
||||||
|
|
||||||
useEffect( () => {
|
useEffect( () => {
|
||||||
if( props.source ) {
|
if( props.source ) {
|
||||||
const imgref = ref( storage, `book_covers/${props.source}`)
|
const imgref = ref( storage, `artworks/${props.source}`)
|
||||||
getDownloadURL( imgref )
|
getDownloadURL( imgref )
|
||||||
.then( (url) => setImage(url) )
|
.then( (url) => setImage(url) )
|
||||||
.catch( err => console.log(err) )
|
.catch( err => console.log(err) )
|
||||||
|
|
|
@ -32,12 +32,10 @@ export function Detail(props) {
|
||||||
<ItemImage source={artworkData.artwork_image} />
|
<ItemImage source={artworkData.artwork_image} />
|
||||||
</Col>
|
</Col>
|
||||||
<Col md={6}>
|
<Col md={6}>
|
||||||
<h2>More information</h2>
|
|
||||||
<h3>Artwork description</h3>
|
<h3>Artwork description</h3>
|
||||||
<p>{artworkData.summary}</p>
|
<p>{artworkData.summary}</p>
|
||||||
<h3>Author</h3>
|
<h3>Author</h3>
|
||||||
<p>systie</p>
|
<p>systie</p>
|
||||||
|
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
|
|
|
@ -22,7 +22,7 @@ export function Home(props) {
|
||||||
<Card key={itemkey} className="position-relative">
|
<Card key={itemkey} className="position-relative">
|
||||||
<a href={itemLink} className="position-absolute" style={{top:0, left:0, right:0, bottom:0}}>
|
<a href={itemLink} className="position-absolute" style={{top:0, left:0, right:0, bottom:0}}>
|
||||||
</a>
|
</a>
|
||||||
<ItemImage source={ artwork.cover_image} />
|
<ItemImage source={ artwork.artwork_image} />
|
||||||
<Card.Body>
|
<Card.Body>
|
||||||
<Card.Title>{ artwork.artwork_title }</Card.Title>
|
<Card.Title>{ artwork.artwork_title }</Card.Title>
|
||||||
</Card.Body>
|
</Card.Body>
|
||||||
|
|
Loading…
Reference in New Issue