diff --git a/web/core/components/workspace/sidebar/dropdown-item.tsx b/web/core/components/workspace/sidebar/dropdown-item.tsx index b2519783135..1b8ace7c214 100644 --- a/web/core/components/workspace/sidebar/dropdown-item.tsx +++ b/web/core/components/workspace/sidebar/dropdown-item.tsx @@ -1,12 +1,17 @@ +"use client"; +import { observer } from "mobx-react"; import Link from "next/link"; import { useParams } from "next/navigation"; import { Check, Settings, UserPlus } from "lucide-react"; +// plane imports import { Menu } from "@headlessui/react"; import { EUserPermissions } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; import { IWorkspace } from "@plane/types"; 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"; type TProps = { @@ -15,11 +20,11 @@ type TProps = { handleItemClick: () => void; handleWorkspaceNavigation: (workspace: IWorkspace) => void; }; -const SidebarDropdownItem = (props: TProps) => { +const SidebarDropdownItem = observer((props: TProps) => { const { workspace, activeWorkspace, handleItemClick, handleWorkspaceNavigation } = props; - - // router params + // router const { workspaceSlug } = useParams(); + // hooks const { t } = useTranslation(); return ( @@ -43,14 +48,14 @@ const SidebarDropdownItem = (props: TProps) => {
{workspace?.logo_url && workspace.logo_url !== "" ? ( {t("workspace_logo")} ) : ( @@ -79,28 +84,32 @@ const SidebarDropdownItem = (props: TProps) => { )}
{workspace.id === activeWorkspace?.id && ( -
+ <> {workspace?.role > EUserPermissions.GUEST && ( - - - {t("settings")} - +
+ + + {t("settings")} + + + + + {t("project_settings.members.invite_members.title")} + + +
)} - - - {t("invite")} - -
+ )} ); -}; +}); export default SidebarDropdownItem;