Product images
This commit is contained in:
@ -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}
|
||||
|
||||
Reference in New Issue
Block a user