From fd64d721c69d550889efc9ab7ec2085a98b390a5 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Tue, 4 Mar 2025 16:07:35 +0100 Subject: [PATCH] fix(ui): resolve SessionItem JSX rendering error - Fix TypeScript error with SessionItem component by providing proper props - Remove unused isSessionsRoute variable - Remove commented out code for better clarity - Fix formatting and indentation throughout the file - Update setTimeout formatting to match project style Signed-off-by: Shekar Siri --- .../components/SessionList/SessionList.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/app/components/shared/SessionsTabOverview/components/SessionList/SessionList.tsx b/frontend/app/components/shared/SessionsTabOverview/components/SessionList/SessionList.tsx index 2a99dbff1..e02cb9246 100644 --- a/frontend/app/components/shared/SessionsTabOverview/components/SessionList/SessionList.tsx +++ b/frontend/app/components/shared/SessionsTabOverview/components/SessionList/SessionList.tsx @@ -1,4 +1,4 @@ - import React, { useEffect } from 'react'; +import React, { useEffect } from 'react'; import { FilterKey } from 'Types/filter/filterType'; import SessionItem from 'Shared/SessionItem'; import { NoContent, Loader, Pagination, Icon } from 'UI'; @@ -25,7 +25,6 @@ const STATUS_FREQUENCY = 5000; function SessionList() { const location = useLocation(); // Get the current URL location - const isSessionsRoute = location.pathname.includes('/sessions'); const isBookmark = location.pathname.includes('/bookmarks'); const { projectsStore, sessionStore, customFieldStore, userStore, searchStore } = useStore(); @@ -43,7 +42,6 @@ function SessionList() { const _filterKeys = filters.map((i: any) => i.key); const hasUserFilter = _filterKeys.includes(FilterKey.USERID) || _filterKeys.includes(FilterKey.USERANONYMOUSID); - // const isBookmark = activeTab.type === 'bookmark'; const isVault = isBookmark && isEnterprise; const activeSite = projectsStore.active; const hasNoRecordings = !activeSite || !activeSite.recorded; @@ -134,7 +132,7 @@ function SessionList() { return; } - sessionTimeOut = setTimeout(function() { + sessionTimeOut = setTimeout(function () { if (!document.hidden) { searchStore.checkForLatestSessions(); } @@ -170,7 +168,7 @@ function SessionList() { title={
- +