mirror of
https://github.com/swissmakers/swiss-datashare.git
synced 2026-04-21 06:03:13 +02:00
36 lines
883 B
TypeScript
36 lines
883 B
TypeScript
import { ActionIcon, Avatar, Menu } from "@mantine/core";
|
|
import { NextLink } from "@mantine/next";
|
|
import { TbDoorExit, TbLink } from "react-icons/tb";
|
|
import authService from "../../services/auth.service";
|
|
|
|
const ActionAvatar = () => {
|
|
return (
|
|
<Menu position="bottom-start" withinPortal>
|
|
<Menu.Target>
|
|
<ActionIcon>
|
|
<Avatar size={28} radius="xl" />
|
|
</ActionIcon>
|
|
</Menu.Target>
|
|
<Menu.Dropdown>
|
|
<Menu.Item
|
|
component={NextLink}
|
|
href="/account/shares"
|
|
icon={<TbLink size={14} />}
|
|
>
|
|
My shares
|
|
</Menu.Item>
|
|
<Menu.Item
|
|
onClick={async () => {
|
|
authService.signOut();
|
|
}}
|
|
icon={<TbDoorExit size={14} />}
|
|
>
|
|
Sign out
|
|
</Menu.Item>
|
|
</Menu.Dropdown>
|
|
</Menu>
|
|
);
|
|
};
|
|
|
|
export default ActionAvatar;
|