kgroad-frontend2/src/features/LogoutButton/LogoutButton.tsx
2024-02-13 19:18:07 +06:00

27 lines
495 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;