umami/components/input/LogoutButton.js
2023-03-22 14:05:55 -07:00

19 lines
524 B
JavaScript

import { Button, Icon, Icons, Tooltip } from 'react-basics';
import Link from 'next/link';
import useMessages from 'hooks/useMessages';
export default function LogoutButton({ tooltipPosition = 'top' }) {
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>
);
}