chore: code refactoring (#5928)
* chore: de dupe code splitting * chore: code refactor
This commit is contained in:
parent
4bc751b7ab
commit
57eb08c8a2
21 changed files with 664 additions and 250 deletions
1
web/ce/components/de-dupe/duplicate-modal/index.ts
Normal file
1
web/ce/components/de-dupe/duplicate-modal/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from "./root";
|
||||
16
web/ce/components/de-dupe/duplicate-modal/root.tsx
Normal file
16
web/ce/components/de-dupe/duplicate-modal/root.tsx
Normal 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 <></>;
|
||||
};
|
||||
1
web/ce/components/de-dupe/duplicate-popover/index.ts
Normal file
1
web/ce/components/de-dupe/duplicate-popover/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from "./root";
|
||||
32
web/ce/components/de-dupe/duplicate-popover/root.tsx
Normal file
32
web/ce/components/de-dupe/duplicate-popover/root.tsx
Normal 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 <></>;
|
||||
});
|
||||
3
web/ce/components/de-dupe/index.ts
Normal file
3
web/ce/components/de-dupe/index.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export * from "./duplicate-modal";
|
||||
export * from "./duplicate-popover";
|
||||
export * from "./issue-block";
|
||||
13
web/ce/components/de-dupe/issue-block/button-label.tsx
Normal file
13
web/ce/components/de-dupe/issue-block/button-label.tsx
Normal 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 <></>;
|
||||
};
|
||||
1
web/ce/components/de-dupe/issue-block/index.ts
Normal file
1
web/ce/components/de-dupe/issue-block/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from "./button-label";
|
||||
11
web/ce/hooks/use-debounced-duplicate-issues.tsx
Normal file
11
web/ce/hooks/use-debounced-duplicate-issues.tsx
Normal 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 };
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue