import { Button } from 'antd';
import { actionAuthLogout } from '../action';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom/cjs/react-router-dom.min';

const ButtonExit = ({authLogaut}) => {
  return (
    <Button onClick={() => authLogaut()}><Link to = {'/'}>Выход</Link> </Button>
  )
}

const ButtonExSite = connect(null, {authLogaut:actionAuthLogout})(ButtonExit);

export default ButtonExSite;