umami/components/input/LogoutButton.js

21 lines
561 B
JavaScript
Raw Normal View History

2023-06-16 05:15:31 +02:00
import { Button, Icon, Icons, TooltipPopup } from 'react-basics';
import Link from 'next/link';
2023-03-22 22:05:55 +01:00
import useMessages from 'hooks/useMessages';
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();
return (
<Link href="/logout">
2023-06-16 05:15:31 +02:00
<TooltipPopup label={formatMessage(labels.logout)} position={tooltipPosition}>
<Button variant="quiet">
<Icon>
<Icons.Logout />
</Icon>
</Button>
2023-06-16 05:15:31 +02:00
</TooltipPopup>
</Link>
);
}
2023-04-21 17:00:42 +02:00
export default LogoutButton;