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

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

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

export default CPageCategory;
