import { Input, Card, Button, Space } from 'antd'; import { useEffect, useState } from 'react'; import { connect } from 'react-redux'; import { actionAddCategory } from '../action'; const ACategory = ({addCat}) => { const [nameCat, setNameCat] =useState(''); const clearInput = () => { setNameCat(''); } return (
Введите название категории
setNameCat(e.target.value)}/>
) } const AddCategory = connect(null, {addCat: actionAddCategory})(ACategory); export default AddCategory;