import {Container, Grid, useMediaQuery} from "@mui/material"; import {useEffect} from "react"; import Breadcrumb from "../../components/Breadcrumbs"; import {connect} from "react-redux"; import {actionFullAllCategory} from "../../actions/ActionCategory"; import {CategoryAside} from "./CategoryAside"; import {Products} from "./Goods"; const CatalogPage = ({category, actionRootCat}) => { const matches = useMediaQuery('(max-width:899px)') useEffect(() => { if(!category) actionRootCat() }, [category]) return ( <>
{category?.payload && }
) } export const CCatalogPage = connect(state => ({category: state.promise['allCategory']}), {actionRootCat: actionFullAllCategory})(CatalogPage)