import { useEffect } from "react";
import { connect } from "react-redux";
import { actionCatById } from "../action";
import { NameCategory, AddCategory, CartChangeGood, SelectGoodAdmin } from "../components";

 
const PCategoryAdmin = ({match, match: {params: {_id}}, getCategory}) => {
  useEffect( () => {
    getCategory(_id);
  }, [_id])

  return (
    <>
       {/* Изменить категорию товара */}
    <div>
      <NameCategory _id={_id}/>
    </div>
      {/* Добавть категорию товара */}
    <div>
      <AddCategory/>
    </div>
        <CartChangeGood/>
      <div>
  
      </div>

    </> 
  )
}



const PageCategoryAdmin = connect(null, {getCategory: actionCatById})(PCategoryAdmin)

export default PageCategoryAdmin;