forked from Transparency/kgroad-frontend2
27 lines
495 B
TypeScript
27 lines
495 B
TypeScript
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;
|