From bc6a983d1e296649fc76b817ca702c5b61bab027 Mon Sep 17 00:00:00 2001 From: dakshesh14 Date: Thu, 26 Oct 2023 20:42:58 +0530 Subject: [PATCH] fix: removed redundant function to get draft issues --- web/store/draft-issues/issue.store.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/web/store/draft-issues/issue.store.ts b/web/store/draft-issues/issue.store.ts index 3b96376c2..0a6d8322c 100644 --- a/web/store/draft-issues/issue.store.ts +++ b/web/store/draft-issues/issue.store.ts @@ -37,7 +37,7 @@ export interface IIssueDraftStore { // computed getIssueType: IIssueType | null; - getIssues: IIssueGroupedStructure | IIssueGroupWithSubGroupsStructure | IIssueUnGroupedStructure | null; + getDraftIssues: IIssueGroupedStructure | IIssueGroupWithSubGroupsStructure | IIssueUnGroupedStructure | null; // actions fetchIssues: (workspaceSlug: string, projectId: string) => Promise; @@ -67,7 +67,7 @@ export class IssueDraftStore implements IIssueDraftStore { draftIssues: observable.ref, // computed getIssueType: computed, - getIssues: computed, + getDraftIssues: computed, // actions fetchIssues: action, createDraftIssue: action, @@ -110,14 +110,6 @@ export class IssueDraftStore implements IIssueDraftStore { return this.draftIssues?.[projectId]?.[issueType] || null; } - get getIssues() { - const projectId: string | null = this.rootStore?.project?.projectId; - const issueType = this.getIssueType; - if (!projectId || !issueType) return null; - - return this.draftIssues?.[projectId]?.[issueType] || null; - } - fetchIssues = async (workspaceSlug: string, projectId: string) => { try { this.loader = true;