diff --git a/web/core/components/issues/peek-overview/root.tsx b/web/core/components/issues/peek-overview/root.tsx index a55b0d546..3685767fd 100644 --- a/web/core/components/issues/peek-overview/root.tsx +++ b/web/core/components/issues/peek-overview/root.tsx @@ -20,10 +20,17 @@ interface IIssuePeekOverview { embedRemoveCurrentNotification?: () => void; is_archived?: boolean; is_draft?: boolean; + shouldReplaceIssueOnFetch?: boolean; } export const IssuePeekOverview: FC = observer((props) => { - const { embedIssue = false, embedRemoveCurrentNotification, is_archived = false, is_draft = false } = props; + const { + embedIssue = false, + embedRemoveCurrentNotification, + is_archived = false, + is_draft = false, + shouldReplaceIssueOnFetch = true, + } = props; // router const pathname = usePathname(); const { @@ -60,7 +67,8 @@ export const IssuePeekOverview: FC = observer((props) => { workspaceSlug, projectId, issueId, - is_archived ? "ARCHIVED" : is_draft ? "DRAFT" : "DEFAULT" + is_archived ? "ARCHIVED" : is_draft ? "DRAFT" : "DEFAULT", + shouldReplaceIssueOnFetch ); setLoader(false); setError(false); diff --git a/web/core/components/page-views/workspace-dashboard.tsx b/web/core/components/page-views/workspace-dashboard.tsx index 165bce60a..d986d1914 100644 --- a/web/core/components/page-views/workspace-dashboard.tsx +++ b/web/core/components/page-views/workspace-dashboard.tsx @@ -64,7 +64,7 @@ export const WorkspaceDashboardView = observer(() => { <> {joinedProjectIds.length > 0 || loader ? ( <> - +
Promise; updateIssue: (workspaceSlug: string, projectId: string, issueId: string, data: Partial) => Promise; removeIssue: (workspaceSlug: string, projectId: string, issueId: string) => Promise; @@ -61,7 +62,13 @@ export class IssueStore implements IIssueStore { }); // actions - fetchIssue = async (workspaceSlug: string, projectId: string, issueId: string, issueType = "DEFAULT") => { + fetchIssue = async ( + workspaceSlug: string, + projectId: string, + issueId: string, + issueType = "DEFAULT", + shouldReplace = true + ) => { const query = { expand: "issue_reactions,issue_attachment,issue_link,parent", }; @@ -107,7 +114,7 @@ export class IssueStore implements IIssueStore { is_subscribed: issue?.is_subscribed, }; - this.rootIssueDetailStore.rootIssueStore.issues.addIssue([issuePayload], true); + this.rootIssueDetailStore.rootIssueStore.issues.addIssue([issuePayload], shouldReplace); // store handlers from issue detail // parent