import React from 'react'; import Cookies from 'js-cookie'; import { Menu, Avatar, Dropdown } from 'antd'; import { Link } from 'react-router-dom'; import { useTheme } from 'styled-components'; import defaultAvatar from '../../images/default_avatar.png'; import { EntityType } from '../../types.generated'; import { useEntityRegistry } from '../useEntityRegistry'; import { GlobalCfg } from '../../conf'; import { isLoggedInVar } from '../auth/checkAuthStatus'; interface Props { urn: string; pictureLink?: string; } const defaultProps = { pictureLink: undefined, }; export const ManageAccount = ({ urn: _urn, pictureLink: _pictureLink }: Props) => { const entityRegistry = useEntityRegistry(); const themeConfig = useTheme(); const handleLogout = () => { isLoggedInVar(false); Cookies.remove(GlobalCfg.CLIENT_AUTH_COOKIE); }; const menu = (
); return (