import { CGoodCard } from "."; import { connect } from "react-redux"; import { Layout, Menu, Breadcrumb, Row, Col, Avatar } from 'antd'; import { useEffect, useState } from "react"; import { Link } from "react-router-dom"; import { CPromisePreloader } from '../reducer' const { SubMenu } = Menu; const Category = ({cat:{name, goods=[], subCategories}}) => { return (

{name}

{goods?.map(good => )} {subCategories?.map(subCateg => {subCateg.name} )}
) } const CCategory = connect(state => ({cat:state.promise.catById?.payload || {}})) (Category) export default CCategory;