/** * Copyright (c) 2023-present Plane Software, Inc. and contributors * SPDX-License-Identifier: AGPL-3.0-only * See the LICENSE file for details. */ import { observer } from "mobx-react"; // plane ui import { ModuleIcon } from "@plane/propel/icons"; import { Tooltip } from "@plane/propel/tooltip"; // plane utils import { cn } from "@plane/utils"; // hooks import { useModule } from "@/hooks/store/use-module"; type Props = { moduleIds: string[] | undefined; shouldShowBorder?: boolean; }; export const IssueBlockModules = observer(function IssueBlockModules({ moduleIds, shouldShowBorder = true }: Props) { const { getModulesByIds } = useModule(); const modules = getModulesByIds(moduleIds ?? []); const modulesString = modules.map((module) => module.name).join(", "); return (
{modules.length <= 1 ? (
{modules?.[0]?.name ?? "No Modules"}
) : (
{modules.length} Modules
)}
); });