umami/components/input/LogoutButton.js

21 lines
546 B
JavaScript
Raw Normal View History

2023-02-08 07:17:55 +01:00
import { Button, Icon, Icons, Tooltip } 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">
<Tooltip label={formatMessage(labels.logout)} position={tooltipPosition}>
<Button variant="quiet">
<Icon>
<Icons.Logout />
</Icon>
</Button>
</Tooltip>
</Link>
);
}
2023-04-21 17:00:42 +02:00
export default LogoutButton;