improvement: minor improvements for workspace switcher (#6609)

This commit is contained in:
Prateek Shourya 2025-02-14 19:03:32 +05:30 committed by GitHub
parent c4a3e1e8ac
commit bf1f12378e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 13 additions and 7 deletions

View file

@ -12,7 +12,7 @@ import { cn, getFileURL } from "@plane/utils";
// helpers
import { getUserRole } from "@/helpers/user.helper";
// plane web imports
import { SubscriptionPill } from "@/plane-web/components/common/subscription-pill";
import { SubscriptionPill } from "@/plane-web/components/common/subscription";
type TProps = {
workspace: IWorkspace;

View file

@ -8,13 +8,13 @@ import { usePopper } from "react-popper";
import { ChevronDown, CirclePlus, LogOut, Mails, Settings } from "lucide-react";
// ui
import { Menu, Transition } from "@headlessui/react";
// types
// plane imports
import { useTranslation } from "@plane/i18n";
import { IWorkspace } from "@plane/types";
// plane ui
import { Avatar, Loader, TOAST_TYPE, setToast } from "@plane/ui";
import { GOD_MODE_URL, cn } from "@/helpers/common.helper";
import { orderWorkspacesList } from "@plane/utils";
// helpers
import { GOD_MODE_URL, cn } from "@/helpers/common.helper";
import { getFileURL } from "@/helpers/file.helper";
// hooks
import { useAppTheme, useUser, useUserProfile, useWorkspace } from "@/hooks/store";
@ -66,7 +66,7 @@ export const SidebarDropdown = observer(() => {
toggleSidebar();
}
};
const workspacesList = Object.values(workspaces ?? {});
const workspacesList = orderWorkspacesList(Object.values(workspaces ?? {}));
// TODO: fix workspaces list scroll
return (
<div className="flex items-center justify-center gap-x-3 gap-y-2">