import { useEffect } from "react";
import { CCategory } from "../components";
import { connect } from "react-redux";
import { actionCatById } from "../action";

const PageCategory = ({match, match: {params: {_id}}, getData}) => {console.log('match',match, _id); 
  useEffect(() => { 
      getData(_id)
  },[_id])
  return (
    <CCategory />
  )
}

const CPageCategory = connect(null, {getData: actionCatById})(PageCategory)

export default CPageCategory;