2023-06-16 05:15:31 +02:00
|
|
|
import { Button, Icon, Icons, TooltipPopup } 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-06-16 05:15:31 +02:00
|
|
|
<TooltipPopup label={formatMessage(labels.logout)} position={tooltipPosition}>
|
2023-03-09 05:23:32 +01:00
|
|
|
<Button variant="quiet">
|
|
|
|
<Icon>
|
|
|
|
<Icons.Logout />
|
|
|
|
</Icon>
|
|
|
|
</Button>
|
2023-06-16 05:15:31 +02:00
|
|
|
</TooltipPopup>
|
2023-01-28 06:53:13 +01:00
|
|
|
</Link>
|
|
|
|
);
|
|
|
|
}
|
2023-04-21 17:00:42 +02:00
|
|
|
|
|
|
|
export default LogoutButton;
|