import { Button } from 'antd'
import { LoginOutlined } from '@ant-design/icons'
import { useNavigate } from 'react-router-dom'

export default function Logout() {
  const navigator = useNavigate()
  const handleLogout = () => {
    localStorage.clear()
    navigator('/login')
  }
  return <Button style={{ border: 'none', background: '#f6f6f6' }} icon={<LoginOutlined />} onClick={handleLogout}></Button>
}
