From 50d55a0c112460f9b2bc0b0339f848908ba9b5ca Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Mon, 11 Mar 2024 06:49:25 -0600 Subject: [PATCH] Simplify comparisons --- web/src/views/events/EventView.tsx | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/web/src/views/events/EventView.tsx b/web/src/views/events/EventView.tsx index a936c1b66..eaae92a0f 100644 --- a/web/src/views/events/EventView.tsx +++ b/web/src/views/events/EventView.tsx @@ -452,13 +452,13 @@ function DetectionReview({ /> )} - {currentItems == null && ( + {!currentItems && (
)} - {currentItems != null && currentItems.length == 0 && ( + {currentItems?.length === 0 && (
There are no {severity.replace(/_/g, " ")}s to review @@ -496,19 +496,17 @@ function DetectionReview({
); })} - {currentItems != null && - currentItems.length > 0 && - (itemsToReview ?? 0) > 0 && ( -
- -
- )} + {(currentItems?.length ?? 0) > 0 && (itemsToReview ?? 0) > 0 && ( +
+ +
+ )}