File size: 656 Bytes
41a71fd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { useSignOut } from '@/features/Auth';
import { Button, ButtonTheme } from '@/shared/ui/Button';
import { classNames } from '@/shared/lib/classNames/classNames';
import cls from './LogoutButton.module.scss';

interface LogoutButtonProps {
    className?: string;
}

export const LogoutButton = (props: LogoutButtonProps) => {
    const { className } = props;
    const { mutate: onLogout } = useSignOut();

    return (
        <Button
            className={classNames(cls.LogoutButton, {}, [className])}
            theme={ButtonTheme.NAVIGATION}
            onClick={() => onLogout()}
        >
            Выйти
        </Button>
    );
};