chore: code refactoring (#5928)

* chore: de dupe code splitting

* chore: code refactor
This commit is contained in:
Anmol Singh Bhatia 2024-10-29 19:39:55 +05:30 committed by GitHub
parent 4bc751b7ab
commit 57eb08c8a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 664 additions and 250 deletions

View file

@ -0,0 +1 @@
export * from "./root";

View file

@ -0,0 +1,16 @@
"use-client";
import { FC } from "react";
// types
import { TDeDupeIssue } from "@plane/types";
type TDuplicateModalRootProps = {
workspaceSlug: string;
issues: TDeDupeIssue[];
handleDuplicateIssueModal: (value: boolean) => void;
};
export const DuplicateModalRoot: FC<TDuplicateModalRootProps> = (props) => {
const { workspaceSlug, issues, handleDuplicateIssueModal } = props;
return <></>;
};

View file

@ -0,0 +1 @@
export * from "./root";

View file

@ -0,0 +1,32 @@
"use client";
import React, { FC } from "react";
import { observer } from "mobx-react";
// types
import { TDeDupeIssue } from "@plane/types";
import { TIssueOperations } from "@/components/issues";
type TDeDupeIssuePopoverRootProps = {
workspaceSlug: string;
projectId: string;
rootIssueId: string;
issues: TDeDupeIssue[];
issueOperations: TIssueOperations;
disabled?: boolean;
renderDeDupeActionModals?: boolean;
isIntakeIssue?: boolean;
};
export const DeDupeIssuePopoverRoot: FC<TDeDupeIssuePopoverRootProps> = observer((props) => {
const {
workspaceSlug,
projectId,
rootIssueId,
issues,
issueOperations,
disabled = false,
renderDeDupeActionModals = true,
isIntakeIssue = false,
} = props;
return <></>;
});

View file

@ -0,0 +1,3 @@
export * from "./duplicate-modal";
export * from "./duplicate-popover";
export * from "./issue-block";

View file

@ -0,0 +1,13 @@
"use client";
import { FC } from "react";
type TDeDupeIssueButtonLabelProps = {
isOpen: boolean;
buttonLabel: string;
};
export const DeDupeIssueButtonLabel: FC<TDeDupeIssueButtonLabelProps> = (props) => {
const { isOpen, buttonLabel } = props;
return <></>;
};

View file

@ -0,0 +1 @@
export * from "./button-label";

View file

@ -0,0 +1,11 @@
import { TDeDupeIssue } from "@plane/types";
export const useDebouncedDuplicateIssues = (
workspaceId: string | undefined,
projectId: string | undefined,
formData: { name: string | undefined; description_html?: string | undefined; issueId?: string | undefined }
) => {
const duplicateIssues: TDeDupeIssue[] = [];
return { duplicateIssues };
};