From e05b37d669936f6a2cef9ff491b5b5b80d374722 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Fri, 11 Jul 2025 15:04:25 -0400 Subject: [PATCH] Apply review suggestions Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- src/apps/dashboard/components/widgets/AlertsLogWidget.tsx | 2 +- src/apps/dashboard/features/sessions/utils/filterSessions.ts | 2 +- src/apps/dashboard/routes/index.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/dashboard/components/widgets/AlertsLogWidget.tsx b/src/apps/dashboard/components/widgets/AlertsLogWidget.tsx index c665e7293..6fca74c23 100644 --- a/src/apps/dashboard/components/widgets/AlertsLogWidget.tsx +++ b/src/apps/dashboard/components/widgets/AlertsLogWidget.tsx @@ -18,7 +18,7 @@ const AlertsLogWidget = () => { hasUserId: false }); - if (isPending || alerts?.Items?.length == 0) return null; + if (isPending || alerts?.Items?.length === 0) return null; return ( { +const filterSessions = (sessions: SessionInfoDto[] = []) => { const minActiveDate = subSeconds(new Date(), MIN_SESSION_ACTIVE_TIME); return sessions.filter(session => { diff --git a/src/apps/dashboard/routes/index.tsx b/src/apps/dashboard/routes/index.tsx index 2c59d735d..76b1d076b 100644 --- a/src/apps/dashboard/routes/index.tsx +++ b/src/apps/dashboard/routes/index.tsx @@ -50,7 +50,7 @@ export const Component = () => { const onScanLibraries = useCallback(() => { const scanLibrariesTask = tasks?.find((value) => value.Key === 'RefreshLibrary'); - if (scanLibrariesTask && scanLibrariesTask.Id) { + if (scanLibrariesTask?.Id) { startTask.mutate({ taskId: scanLibrariesTask.Id });