From 13c8e66cb64185e0632da973cface7f45eb68f5f Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 13 Jun 2024 08:35:20 -0600 Subject: [PATCH] Show text on tablets as well --- web/src/views/events/EventView.tsx | 60 +++++++++++++++--------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/web/src/views/events/EventView.tsx b/web/src/views/events/EventView.tsx index e405ed503..2832ab3fd 100644 --- a/web/src/views/events/EventView.tsx +++ b/web/src/views/events/EventView.tsx @@ -29,7 +29,7 @@ import { useRef, useState, } from "react"; -import { isDesktop, isMobile } from "react-device-detect"; +import { isDesktop, isMobile, isMobileOnly } from "react-device-detect"; import { LuFolderCheck, LuFolderX } from "react-icons/lu"; import { MdCircle } from "react-icons/md"; import useSWR from "swr"; @@ -248,19 +248,7 @@ export default function EventView({ value="alert" aria-label="Select alerts" > - {isDesktop ? ( - <> - -
- Alerts - {reviewCounts.alert > -1 ? ( - ` ∙ ${reviewCounts.alert}` - ) : ( - - )} -
- - ) : ( + {isMobileOnly ? (
)}
+ ) : ( + <> + +
+ Alerts + {reviewCounts.alert > -1 ? ( + ` ∙ ${reviewCounts.alert}` + ) : ( + + )} +
+ )} - {isDesktop ? ( - <> - -
- Detections - {reviewCounts.detection > -1 ? ( - ` ∙ ${reviewCounts.detection}` - ) : ( - - )} -
- - ) : ( + {isMobileOnly ? (
)}
+ ) : ( + <> + +
+ Detections + {reviewCounts.detection > -1 ? ( + ` ∙ ${reviewCounts.detection}` + ) : ( + + )} +
+ )}
- {isDesktop ? ( + {isMobileOnly ? ( + + ) : ( <>
Motion
- ) : ( - )}