Product images
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<comment version="3.0">
|
||||
<caption>FILE PHOTO: Coca-cola soda is shown on display during a preview of a new Walmart Super Center prior to its opening in Compton, California,</caption>
|
||||
<note>FILE PHOTO: Coca-cola soda is shown on display during a preview of a new Walmart Super Center prior to its opening in Compton, California, U.S., January 10, 2017. REUTERS/Mike Blake/File Photo</note>
|
||||
<place/>
|
||||
<categories/>
|
||||
</comment>
|
||||
BIN
frontend/public/static/products/cappuccino.jpeg
Normal file
|
After Width: | Height: | Size: 98 KiB |
BIN
frontend/public/static/products/coca-cola.jpeg
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
frontend/public/static/products/cockta.jpeg
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
frontend/public/static/products/fanta.jpeg
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
frontend/public/static/products/kava-bez-secera.jpeg
Normal file
|
After Width: | Height: | Size: 138 KiB |
BIN
frontend/public/static/products/kava-s-mlijekom.jpeg
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
frontend/public/static/products/kava.jpeg
Normal file
|
After Width: | Height: | Size: 115 KiB |
BIN
frontend/public/static/products/mocca.jpeg
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
frontend/public/static/products/pepsi.jpeg
Normal file
|
After Width: | Height: | Size: 160 KiB |
BIN
frontend/public/static/products/sendvic-sa-sirom.jpeg
Normal file
|
After Width: | Height: | Size: 133 KiB |
BIN
frontend/public/static/products/sendvic-sa-sunkom.jpeg
Normal file
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 172 KiB |
@ -4,17 +4,15 @@ import CardContent from "@mui/material/CardContent";
|
||||
import CardMedia from "@mui/material/CardMedia";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import { CardActionArea } from "@mui/material";
|
||||
import { PRODUCT_IMAGE_DIR } from "../const";
|
||||
|
||||
function ProductCard({ product }) {
|
||||
const productImg = `${PRODUCT_IMAGE_DIR}/${product.image}`;
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<CardActionArea>
|
||||
<CardMedia
|
||||
component="img"
|
||||
height="140"
|
||||
image="/static/images/cards/contemplative-reptile.jpg"
|
||||
alt="green iguana"
|
||||
/>
|
||||
<CardMedia component="img" height="140" image={productImg} alt={product.name} />
|
||||
<CardContent>
|
||||
<Typography gutterBottom variant="h5" component="div">
|
||||
{product.name}
|
||||
|
||||
@ -1 +1,2 @@
|
||||
export const API_URL = process.env.REACT_APP_BACKEND_API_URL || "http://localhost:10000";
|
||||
export const PRODUCT_IMAGE_DIR = "/static/products/";
|
||||
|
||||