mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
23 lines
648 B
JavaScript
23 lines
648 B
JavaScript
import { Button, Icon, Icons, PopupTrigger, Tooltip } from 'react-basics';
|
|
import Link from 'next/link';
|
|
import { labels } from 'components/messages';
|
|
import { useIntl } from 'react-intl';
|
|
|
|
export default function LogoutButton({ tooltipPosition = 'top' }) {
|
|
const { formatMessage } = useIntl();
|
|
return (
|
|
<Link href="/logout">
|
|
<a>
|
|
<PopupTrigger action="hover">
|
|
<Button variant="quiet">
|
|
<Icon>
|
|
<Icons.Logout />
|
|
</Icon>
|
|
</Button>
|
|
<Tooltip position={tooltipPosition}>{formatMessage(labels.logout)}</Tooltip>
|
|
</PopupTrigger>
|
|
</a>
|
|
</Link>
|
|
);
|
|
}
|