import React from 'react';
import { connect } from 'react-redux';
import router from 'umi/router';
import styles from './index.less';
class GroupItem extends React.PureComponent {
goDetail = index => {
router.push(`/breed/group?index=${index}`);
};
render() {
const { item, index } = this.props;
return (
{
this.goDetail(index);
}}
>
{item.chinese_group_name}
{item.english_group_name}
{index + 1}
);
}
}
@connect(({ dogGroup }) => ({ dogGroup }))
class DogGroup extends React.PureComponent {
componentWillMount = () => {
this.props.dispatch({
type: 'dogGroup/getFciGroup',
payload: {},
});
};
componentDidMount = () => {};
componentWillUnmount = () => {};
render() {
const { list } = this.props.dogGroup;
return (
{list
? list.map((data, index) => {
return ;
})
: null}
);
}
}
export default DogGroup;