import React from 'react'; import {useState} from "react"; import Link from "react-router-dom/es/Link"; import {Accordion, AccordionDetails, AccordionSummary, Grid, Typography} from "@mui/material"; import ExpandMoreIcon from "@mui/icons-material/ExpandMore"; const CategoryItem = ({object: {_id, name, subCategories}={}}) => { const [expanded, setExpanded] = useState(false); const handleChange = (panel) => (event, isExpanded) => { setExpanded(isExpanded ? panel : false); }; return ( <> {subCategories === null || !subCategories ?
  • {name || 'no name'}
  • :
  • } aria-controls="panel1bh-content" id="panel1bh-header" > {name || 'no name'}
      {subCategories && Object.values(subCategories).map(item => )}
  • } ) } export const CategoryAside = ({category}) => { return ( PRODUCT CATEGORIES ) }