У меня есть компонент, выполненный в React, который имеет 6 опытов, и каждый опыт создает всплывающее окно с массивом изображений. Я делаю поповер, используя материал пользовательского интерфейса, поповер работает, но у меня есть несколько ошибок в консоли, и я не знаю, как их исправить.
это мой компонент
const Experiences = memo(
(props) => {
const { className } = props;
const classes = useStyles(props);
const [anchorEl, setAnchorEl] = React.useState(null);
const handleClick = (event) => {
setAnchorEl(event.currentTarget);
};
const open = Boolean(anchorEl);
const experience = (img, title, category, id, popoverCategory, open) => (
<div
className="experience"
aria-describedby={id}
id={id}
onClick={handleClick}
>
<img
data-sizes="auto"
className="lazyload"
data-src={img}
alt={title}
/>
<div className="experience-title">
<Typography
color="textSecondary"
variant="subtitle2"
className="highlight highlight1"
display="inline"
>
{ title }
</Typography>
</div>
<Popper
id={id}
open={anchorEl && anchorEl.id === id}
anchorEl={anchorEl}
>
<div className={classes.paper}>
{
popoverCategory.map(url => (
<img
data-sizes="auto"
className="lazyload"
data-src={popoverCategory}
alt="Puntospoint"
/>
))
}
</div>
</Popper>
</div>
);
return (
<div className={clsx(classes.root, className)}>
<div className="experiences-column col1">
{experience(gastronomia, 'GASTRONOMÍA', 'gastronomia', 'gastronomia', gastronomiaExperiences, open)}
{experience(giftcard, 'GIFT CARD', 'giftcard', 'giftcard', giftcardExperiences, open)}
{experience(deporte, 'DEPORTE', 'deporte', 'deporte', deporteExperiences, open)}
</div>
<div className="experiences-column col2">
{experience(productos, 'PRODUCTOS', 'productos', 'productos', productosExperiences, open)}
{experience(diversion, 'DIVERSIÓN', 'diversion', 'diversion', diversionExperiences, open)}
{experience(belleza, 'BELLEZA', 'belleza', 'belleza', bellezaExperiences, open)}
</div>
</div>
);
},
);
Это ошибки
Это первый раз, когда я использую материал UI, и я новичок, чтобы реагировать, поэтому я немного растерялся.