import { Fragment } from "react"; import { useRouter } from "next/router"; import { useTheme } from "next-themes"; import { observer } from "mobx-react-lite"; import Link from "next/link"; // components import { Menu, Transition } from "@headlessui/react"; // icons import { LogIn, LogOut, Settings, UserCog2 } from "lucide-react"; // hooks import { useAppTheme } from "hooks/useTheme"; // hooks // import useToast from "hooks/use-toast"; // ui import { Avatar, Tooltip } from "@plane/ui"; // Static Data const PROFILE_LINKS = [ { key: "settings", name: "Settings", icon: Settings, link: `/profile`, }, ]; export const SidebarDropdown = observer(() => { // router // const router = useRouter(); // store hooks const { sidebarCollapsed } = useAppTheme(); // const { signOut, currentUser, currentUserSettings } = useUser(); // hooks // const { setToastAlert } = useToast(); const { setTheme } = useTheme(); // redirect url for normal mode // const redirectWorkspaceSlug = // workspaceSlug || // currentUserSettings?.workspace?.last_workspace_slug || // currentUserSettings?.workspace?.fallback_workspace_slug || // ""; const handleSignOut = async () => { // await signOut() // .then(() => { // mutate("CURRENT_USER_DETAILS", null); // setTheme("system"); // router.push("/"); // }) // .catch(() => // setToastAlert({ // type: "error", // title: "Error!", // message: "Failed to sign out. Please try again.", // }) // ); }; return (