Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/types/src/workspace.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export interface IWorkspace {
readonly updated_by: string;
organization_size: string;
total_projects?: number;
current_plan?: string;
role: number;
}

Expand Down
1 change: 1 addition & 0 deletions packages/utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ export * from "./issue";
export * from "./state";
export * from "./string";
export * from "./theme";
export * from "./workspace";
5 changes: 5 additions & 0 deletions packages/utils/src/workspace.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// plane imports
import { IWorkspace } from "@plane/types";

export const orderWorkspacesList = (workspaces: IWorkspace[]): IWorkspace[] =>
workspaces.sort((a, b) => a.name.localeCompare(b.name));
1 change: 1 addition & 0 deletions web/ce/components/common/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./subscription";
1 change: 1 addition & 0 deletions web/ce/components/common/subscription/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./subscription-pill";
2 changes: 1 addition & 1 deletion web/core/components/workspace/sidebar/dropdown-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions web/core/components/workspace/sidebar/dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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">
Expand Down
1 change: 0 additions & 1 deletion web/ee/components/common/subscription-pill.tsx

This file was deleted.