import { UserOutlined } from "@ant-design/icons";
import { Menu } from "antd";
import React from "react";
import { connect } from "react-redux";
import { signOutStart } from "../../../redux/user/user.actions";

const mapDispatchToProps = (dispatch) => ({
  signOutStart: () => dispatch(signOutStart()),
});

export function SiderSignOut({ signOutStart, ...restProps }) {
  return (
    <Menu.Item
      icon={<UserOutlined />}
      {...restProps}
      onClick={() => signOutStart()}
    >
      Sign Out
    </Menu.Item>
  );
}
export default connect(null, mapDispatchToProps)(SiderSignOut);
