import { Button } from 'antd'; import { actionAuthLogout } from '../action'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom/cjs/react-router-dom.min'; import {useHistory} from 'react-router-dom'; const ButtonExit = ({authLogaut}) => { let history = useHistory(); const exit = () => { authLogaut(); history.push("/"); } return ( ) } const ButtonExSite = connect(null, {authLogaut:actionAuthLogout})(ButtonExit); export default ButtonExSite;