diff --git a/apps/space/ce/components/editor/embeds/index.ts b/apps/space/ce/components/editor/embeds/index.ts deleted file mode 100644 index 8146e94d9..000000000 --- a/apps/space/ce/components/editor/embeds/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./mentions"; diff --git a/apps/space/ce/components/editor/embeds/mentions/root.tsx b/apps/space/ce/components/editor/embeds/mentions/root.tsx index b04de12cf..6fc36cc74 100644 --- a/apps/space/ce/components/editor/embeds/mentions/root.tsx +++ b/apps/space/ce/components/editor/embeds/mentions/root.tsx @@ -1,6 +1,8 @@ // plane editor import type { TCallbackMentionComponentProps } from "@plane/editor"; -export function EditorAdditionalMentionsRoot(_props: TCallbackMentionComponentProps) { +export type TEditorMentionComponentProps = TCallbackMentionComponentProps; + +export function EditorAdditionalMentionsRoot(_props: TEditorMentionComponentProps) { return null; } diff --git a/apps/space/ce/components/editor/index.ts b/apps/space/ce/components/editor/index.ts deleted file mode 100644 index cf8352ae4..000000000 --- a/apps/space/ce/components/editor/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./embeds"; diff --git a/apps/space/core/components/editor/embeds/mentions/root.tsx b/apps/space/core/components/editor/embeds/mentions/root.tsx index fc6454bd4..7b1f7f718 100644 --- a/apps/space/core/components/editor/embeds/mentions/root.tsx +++ b/apps/space/core/components/editor/embeds/mentions/root.tsx @@ -1,11 +1,10 @@ -// plane editor -import type { TCallbackMentionComponentProps } from "@plane/editor"; -// plane web components -import { EditorAdditionalMentionsRoot } from "@/plane-web/components/editor"; +// plane web imports +import type { TEditorMentionComponentProps } from "@/plane-web/components/editor/embeds/mentions"; +import { EditorAdditionalMentionsRoot } from "@/plane-web/components/editor/embeds/mentions"; // local components import { EditorUserMention } from "./user"; -export function EditorMentionsRoot(props: TCallbackMentionComponentProps) { +export function EditorMentionsRoot(props: TEditorMentionComponentProps) { const { entity_identifier, entity_name } = props; switch (entity_name) { diff --git a/apps/space/core/components/issues/issue-layouts/properties/state.tsx b/apps/space/core/components/issues/issue-layouts/properties/state.tsx index 344c91c8e..f689e2636 100644 --- a/apps/space/core/components/issues/issue-layouts/properties/state.tsx +++ b/apps/space/core/components/issues/issue-layouts/properties/state.tsx @@ -1,31 +1,47 @@ +"use client"; + import { observer } from "mobx-react"; // plane ui import { StateGroupIcon } from "@plane/propel/icons"; import { Tooltip } from "@plane/propel/tooltip"; +import type { TStateGroups } from "@plane/types"; // plane utils import { cn } from "@plane/utils"; //hooks import { useStates } from "@/hooks/store/use-state"; type Props = { - stateId: string | undefined; shouldShowBorder?: boolean; -}; -export const IssueBlockState = observer(function IssueBlockState({ stateId, shouldShowBorder = true }: Props) { - const { getStateById } = useStates(); +} & ( + | { + stateDetails: { + name: string; + group: TStateGroups; + }; + } + | { + stateId: string; + } +); - const state = getStateById(stateId); +export const IssueBlockState: React.FC = observer((props) => { + const { shouldShowBorder = true } = props; + // store hooks + const { getStateById } = useStates(); + // derived values + const state = "stateId" in props ? getStateById(props.stateId) : props.stateDetails; + if (!state) return null; return ( - +
- -
{state?.name ?? "State"}
+ +
{state.name}