mirror of
https://github.com/swissmakers/swiss-datashare.git
synced 2026-04-21 06:03:13 +02:00
44 lines
1006 B
TypeScript
44 lines
1006 B
TypeScript
|
|
import { ActionIcon, Avatar, Menu } from "@mantine/core";
|
||
|
|
import { NextLink } from "@mantine/next";
|
||
|
|
import { DoorExit, Link } from "tabler-icons-react";
|
||
|
|
import aw from "../../utils/appwrite.util";
|
||
|
|
|
||
|
|
const ActionAvatar = () => {
|
||
|
|
return (
|
||
|
|
<Menu
|
||
|
|
control={
|
||
|
|
<ActionIcon>
|
||
|
|
<Avatar size={28} radius="xl" />
|
||
|
|
</ActionIcon>
|
||
|
|
}
|
||
|
|
>
|
||
|
|
<Menu.Label>My account</Menu.Label>
|
||
|
|
<Menu.Item
|
||
|
|
component={NextLink}
|
||
|
|
href="/account/shares"
|
||
|
|
icon={<Link size={14} />}
|
||
|
|
>
|
||
|
|
Shares
|
||
|
|
</Menu.Item>
|
||
|
|
{/* <Menu.Item
|
||
|
|
component={NextLink}
|
||
|
|
href="/account/shares"
|
||
|
|
icon={<Settings size={14} />}
|
||
|
|
>
|
||
|
|
Settings
|
||
|
|
</Menu.Item> */}
|
||
|
|
<Menu.Item
|
||
|
|
onClick={async () => {
|
||
|
|
await aw.account.deleteSession("current");
|
||
|
|
window.location.reload();
|
||
|
|
}}
|
||
|
|
icon={<DoorExit size={14} />}
|
||
|
|
>
|
||
|
|
Sign out
|
||
|
|
</Menu.Item>
|
||
|
|
</Menu>
|
||
|
|
);
|
||
|
|
};
|
||
|
|
|
||
|
|
export default ActionAvatar;
|