2023-02-08 07:17:55 +01:00
|
|
|
import { Button, Icon, Icons, Tooltip } from 'react-basics';
|
2023-01-28 06:53:13 +01:00
|
|
|
import Link from 'next/link';
|
|
|
|
import { labels } from 'components/messages';
|
|
|
|
import { useIntl } from 'react-intl';
|
|
|
|
|
|
|
|
export default function LogoutButton({ tooltipPosition = 'top' }) {
|
|
|
|
const { formatMessage } = useIntl();
|
|
|
|
return (
|
|
|
|
<Link href="/logout">
|
|
|
|
<a>
|
2023-02-08 07:17:55 +01:00
|
|
|
<Tooltip label={formatMessage(labels.logout)} position={tooltipPosition}>
|
2023-01-28 06:53:13 +01:00
|
|
|
<Button variant="quiet">
|
|
|
|
<Icon>
|
|
|
|
<Icons.Logout />
|
|
|
|
</Icon>
|
|
|
|
</Button>
|
2023-02-08 07:17:55 +01:00
|
|
|
</Tooltip>
|
2023-01-28 06:53:13 +01:00
|
|
|
</a>
|
|
|
|
</Link>
|
|
|
|
);
|
|
|
|
}
|