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';
|
2023-03-22 22:05:55 +01:00
|
|
|
import useMessages from 'hooks/useMessages';
|
2023-01-28 06:53:13 +01:00
|
|
|
|
2023-04-21 17:00:42 +02:00
|
|
|
export function LogoutButton({ tooltipPosition = 'top' }) {
|
2023-03-22 22:05:55 +01:00
|
|
|
const { formatMessage, labels } = useMessages();
|
2023-01-28 06:53:13 +01:00
|
|
|
return (
|
|
|
|
<Link href="/logout">
|
2023-03-09 05:23:32 +01:00
|
|
|
<Tooltip label={formatMessage(labels.logout)} position={tooltipPosition}>
|
|
|
|
<Button variant="quiet">
|
|
|
|
<Icon>
|
|
|
|
<Icons.Logout />
|
|
|
|
</Icon>
|
|
|
|
</Button>
|
|
|
|
</Tooltip>
|
2023-01-28 06:53:13 +01:00
|
|
|
</Link>
|
|
|
|
);
|
|
|
|
}
|
2023-04-21 17:00:42 +02:00
|
|
|
|
|
|
|
export default LogoutButton;
|