From 19555332360638f4bcaaadf87b734916d192eed5 Mon Sep 17 00:00:00 2001 From: Donald Wu Date: Mon, 2 Jan 2023 18:36:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20fix=20lint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/components/cardView/CardView.tsx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/apps/web/src/components/cardView/CardView.tsx b/apps/web/src/components/cardView/CardView.tsx index 2cc2bf5..ddb0164 100644 --- a/apps/web/src/components/cardView/CardView.tsx +++ b/apps/web/src/components/cardView/CardView.tsx @@ -239,7 +239,7 @@ function CardView({ incident, normalUsers, getIncidents }: Props) { const minutesDiff = now.diff(incidentCreatedDate, 'minutes'); const hoursDiff = now.diff(incidentCreatedDate, 'hours'); - + let timeDiffStr = ''; if (minutesDiff <= 60) { timeDiffStr = `${minutesDiff} minutes ago`; @@ -253,16 +253,14 @@ function CardView({ incident, normalUsers, getIncidents }: Props) { return ( <> - { - userRole && userRole === UserRole.ADMIN ? + {userRole && userRole === UserRole.ADMIN ? (
- handleDeleteButtonClick()} - /> -
: - null - } + handleDeleteButtonClick()} + /> + + ) : null} {incident.title}