From d2d431c0585c628846d8eb79ae73a9f72b0958bc Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal Date: Mon, 21 Aug 2023 20:48:27 +0530 Subject: [PATCH] chore: hide new issue button from my subscribed issues page --- .../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 a6fdc81b4bf..6451bd1aac1 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}