Snažím se zobrazit obrázky s itemDate.js soubor :
const itemData = [
{
img: "../assets/photos/photoportrait.jpeg",
title: 'Breakfast',
},
a volá se moje Portfolio komponent:
import * as React from 'react';
import ImageList from '@mui/material/ImageList';
import ImageListItem from '@mui/material/ImageListItem';
import itemData from './itemData';
function Portfolio() {
return(
<ImageList sx={{ width: 500, height: 450 }} cols={3} rowHeight={164}>
{itemData.map((item) => (
<ImageListItem key={item.img}>
<img
src={item.img}
srcSet={item.img}
alt={item.title}
loading="lazy"
/>
</ImageListItem>
))}
</ImageList>
tam je žádná chybová zpráva, cesta je správná, ale nic se objeví na mé stránce. Je to práce s odkaz ale neznamená, pracuje s místní cestu. nějaký nápad?
Děkuji