import { signOut } from "next-auth/react";
import "./LogoutButton.scss";

interface ILogoutButtonProps {
  className?: string;
}

const LogoutButton: React.FC<ILogoutButtonProps> = ({
  className,
}: ILogoutButtonProps) => {
  return (
    <button
      type="button"
      className={`logout-btn ${className}`}
      onClick={() =>
        signOut({
          callbackUrl: "/",
        })
      }
    >
      Выйти из аккаунта
    </button>
  );
};

export default LogoutButton;
