mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 09:45:04 +01:00
20 lines
551 B
JavaScript
20 lines
551 B
JavaScript
import { Button, Icon, Icons, 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">
|
|
<Tooltip label={formatMessage(labels.logout)} position={tooltipPosition}>
|
|
<Button variant="quiet">
|
|
<Icon>
|
|
<Icons.Logout />
|
|
</Icon>
|
|
</Button>
|
|
</Tooltip>
|
|
</Link>
|
|
);
|
|
}
|