Remove extrra references to "books" and replace with "art" & "artworks"

This commit is contained in:
Ray 2023-12-04 12:33:13 +00:00 committed by GitHub
parent 7e9eab9b76
commit 9153ab927c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 23 deletions

View File

@ -1,13 +1,13 @@
apple-touch-icon.png,1701692359760,636540c762d4809990b0a3f99b00b6a5523e8c44054b3e6536bc8bd01d618a17
asset-manifest.json,1701692391444,d63807b686cde494acefdc4a7f66adb30289726729387faca740a259955aa096
index.html,1701692391444,daf02593ee90bdb64a7d2a629b2b3ba4b375afd6d6fcb8eb6e4791540b8d10d6
logo192.png,1701692359760,c621f7ba0965ce7fc3f1a429c12a4a1d9cae19877ce3b8cebee93845deab0617
manifest.json,1701692359760,0958a5e0c831126100c8c2d06a6bbaa665a3900f21aaff4130238a6f5a113aa1
robots.txt,1701692359760,2544ca049f223a42bff01f72ad930a5edba75bbb7199d0f8430a02ff5aca16ec
static/js/787.fe1675bb.chunk.js.map,1701692391472,683229073c7ef9ee1a721578162763c4560a3420f836b325c01601e50f646529
static/js/main.db77c455.js.LICENSE.txt,1701692391464,025207c5e9934797fea1918a1560a8d2747ae5dd12179436ec22ee8c84341806
static/js/787.fe1675bb.chunk.js,1701692391468,09044c094544c6017476721265373bd92ca82ed8434b6f9c010fe07087e14d49
static/css/main.6ccd65a8.css,1701692391464,265f9979f4391283252fdae35b22ffd098a887c8d5f299ccf72fa2f4335c8303
static/css/main.6ccd65a8.css.map,1701692391468,6d6f3434075d5f325c92f6ab942391103fcbf237317eb7d825dd42e97c416961
static/js/main.db77c455.js,1701692391472,607a62798805c9f0e2722520a5e953c972f056aa9e9c1927862df4624ab283ae
static/js/main.db77c455.js.map,1701692391468,9c54119ec5a1a4f6b2f1db5aef3b244bcddf8ef5783b0b9ea1f65037d5ec625d
apple-touch-icon.png,1701692923836,636540c762d4809990b0a3f99b00b6a5523e8c44054b3e6536bc8bd01d618a17
logo192.png,1701692923836,c621f7ba0965ce7fc3f1a429c12a4a1d9cae19877ce3b8cebee93845deab0617
asset-manifest.json,1701692939720,984d6a9917e2b1eb48ab44c5cf8ceadbb7e75b153d36633e21e876dd86938615
index.html,1701692939720,6439e244243395a95846b1d13f0e06d4076d19d25a05009d7c5607286e45dfe4
robots.txt,1701692923836,2544ca049f223a42bff01f72ad930a5edba75bbb7199d0f8430a02ff5aca16ec
manifest.json,1701692923836,0958a5e0c831126100c8c2d06a6bbaa665a3900f21aaff4130238a6f5a113aa1
static/js/787.fe1675bb.chunk.js,1701692939740,09044c094544c6017476721265373bd92ca82ed8434b6f9c010fe07087e14d49
static/js/main.7af27e90.js.LICENSE.txt,1701692939740,025207c5e9934797fea1918a1560a8d2747ae5dd12179436ec22ee8c84341806
static/js/787.fe1675bb.chunk.js.map,1701692939740,683229073c7ef9ee1a721578162763c4560a3420f836b325c01601e50f646529
static/css/main.6ccd65a8.css,1701692939740,265f9979f4391283252fdae35b22ffd098a887c8d5f299ccf72fa2f4335c8303
static/css/main.6ccd65a8.css.map,1701692939740,6d6f3434075d5f325c92f6ab942391103fcbf237317eb7d825dd42e97c416961
static/js/main.7af27e90.js,1701692939740,a9ebc80eca658f059127a64fa60d7a4be1f8ac2bea4f6651367f65be83308639
static/js/main.7af27e90.js.map,1701692939740,e45ce5625cb92a115f5693059a16d0ccfcd7b06d49c4f791689e486880aceefa

View File

@ -2,32 +2,29 @@ import Row from 'react-bootstrap/Row';
import Col from 'react-bootstrap/Col';
import Container from "react-bootstrap/Container";
import Card from "react-bootstrap/Card";
import { useState, useEffect, useContext } from "react"
import { useState, useEffect } from "react"
import { ItemImage } from "../components/ItemImage"
export function Home(props) {
const [books,setBooks] = useState([])
const [artworks,setArtworks] = useState([])
useEffect(() => {
console.log( props.items )
setBooks( props.items )
setArtworks( props.items )
}, [props.items])
const ItemCards = books.map( ( book, itemkey ) => {
const itemLink = `/detail/${book.id}`
const ItemCards = artworks.map( ( artwork, itemkey ) => {
const itemLink = `/detail/${artwork.id}`
return(
<Col md={4} className="mb-4" key={itemkey}>
<Card key={itemkey} className="position-relative">
<a href={itemLink} className="position-absolute" style={{top:0, left:0, right:0, bottom:0}}>
</a>
<ItemImage source={ book.cover_image} />
<ItemImage source={ artwork.cover_image} />
<Card.Body>
<Card.Title>{ book.book_title }</Card.Title>
<Card.Text>
By {book.author}
</Card.Text>
<Card.Title>{ artwork.artwork_title }</Card.Title>
</Card.Body>
</Card>
</Col>