From b02417120b816a9d5205c23abe2fba1170b3540a Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Mon, 21 Aug 2023 20:50:17 +0530 Subject: [PATCH] chore: hide new issue button from my subscribed issues page (#1927) --- .../issues/my-issues/my-issues-view.tsx | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/apps/app/components/issues/my-issues/my-issues-view.tsx b/apps/app/components/issues/my-issues/my-issues-view.tsx index a6fdc81b4..6451bd1aa 100644 --- a/apps/app/components/issues/my-issues/my-issues-view.tsx +++ b/apps/app/components/issues/my-issues/my-issues-view.tsx @@ -270,16 +270,18 @@ export const MyIssuesView: React.FC = ({ ? "You have not created any issue yet." : "You have not subscribed to any issue yet.", description: "Keep track of your work in a single place.", - primaryButton: { - icon: , - text: "New Issue", - onClick: () => { - const e = new KeyboardEvent("keydown", { - key: "c", - }); - document.dispatchEvent(e); - }, - }, + primaryButton: filters.subscriber + ? undefined + : { + icon: , + text: "New Issue", + onClick: () => { + const e = new KeyboardEvent("keydown", { + key: "c", + }); + document.dispatchEvent(e); + }, + }, }} handleOnDragEnd={handleOnDragEnd} handleIssueAction={handleIssueAction}