2024-07-05 14:58:42 +05:30
|
|
|
// editor
|
2025-08-15 13:10:26 +05:30
|
|
|
import type { TEmbedConfig } from "@plane/editor";
|
2024-12-27 20:41:38 +05:30
|
|
|
// plane types
|
2025-08-15 13:10:26 +05:30
|
|
|
import type { TSearchEntityRequestPayload, TSearchResponse } from "@plane/types";
|
2024-07-05 14:58:42 +05:30
|
|
|
// plane web components
|
|
|
|
|
import { IssueEmbedUpgradeCard } from "@/plane-web/components/pages";
|
|
|
|
|
|
2024-12-27 20:41:38 +05:30
|
|
|
export type TIssueEmbedHookProps = {
|
|
|
|
|
fetchEmbedSuggestions?: (payload: TSearchEntityRequestPayload) => Promise<TSearchResponse>;
|
|
|
|
|
projectId?: string;
|
|
|
|
|
workspaceSlug?: string;
|
|
|
|
|
};
|
|
|
|
|
|
2024-07-05 14:58:42 +05:30
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
2024-12-27 20:41:38 +05:30
|
|
|
export const useIssueEmbed = (props: TIssueEmbedHookProps) => {
|
2024-07-05 14:58:42 +05:30
|
|
|
const widgetCallback = () => <IssueEmbedUpgradeCard />;
|
|
|
|
|
|
|
|
|
|
const issueEmbedProps: TEmbedConfig["issue"] = {
|
|
|
|
|
widgetCallback,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
issueEmbedProps,
|
|
|
|
|
};
|
|
|
|
|
};
|