Fixed image not showing after filtering by importing a static asset

This commit is contained in:
Laura Dolibois
2025-05-31 18:53:21 +02:00
parent 0779375e1a
commit d97a135b2f

View File

@@ -4,7 +4,8 @@ import { useNavigate } from "react-router-dom";
import Item from "../../components/Item"; import Item from "../../components/Item";
import { useBasket } from "../BasketProvider"; import { useBasket } from "../BasketProvider";
import "../helper.css"; import "../helper.css";
import {useTranslation} from 'react-i18next'; import { useTranslation } from 'react-i18next';
import HTWImage from '../../assets/HTW.jpg';
export default function ItemCard({ item }: { item: Item }) { export default function ItemCard({ item }: { item: Item }) {
@@ -28,7 +29,7 @@ export default function ItemCard({ item }: { item: Item }) {
<CardMedia <CardMedia
component="img" component="img"
height="140" height="140"
image="src//assets/HTW.jpg" image={HTWImage}
alt={item.name} alt={item.name}
/> />
<CardContent> <CardContent>