import { Fragment } from "react"; import { observer } from "mobx-react"; import Link from "next/link"; // icons import { LogIn, LogOut, Settings, UserCog2 } from "lucide-react"; // headless ui import { Menu, Transition } from "@headlessui/react"; // ui import { Avatar, TOAST_TYPE, Tooltip, setToast } from "@plane/ui"; // hooks import { useAppRouter, useAppTheme, useUser } from "@/hooks/store"; import { usePlatformOS } from "@/hooks/use-platform-os"; // Static Data const PROFILE_LINKS = [ { key: "settings", name: "Settings", icon: Settings, link: `/profile`, }, ]; export const InstanceSidebarDropdown = observer(() => { // store hooks const { sidebarCollapsed } = useAppTheme(); const { workspaceSlug } = useAppRouter(); const { data: currentUser } = useUser(); const { signOut } = useUser(); // hooks // const { setTheme } = useTheme(); const { isMobile } = usePlatformOS(); // redirect url for normal mode const redirectWorkspaceSlug = workspaceSlug || // currentUserSettings?.workspace?.last_workspace_slug || // currentUserSettings?.workspace?.fallback_workspace_slug || ""; const handleSignOut = async () => { await signOut().catch(() => setToast({ type: TOAST_TYPE.ERROR, title: "Error!", message: "Failed to sign out. Please try again.", }) ); }; return (