From 9e8ea8506046e788202c7b8fe62775a78c848649 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Mon, 26 Jun 2023 11:36:24 +0200 Subject: [PATCH] change(ui): check for sessions and loading state --- .../components/SessionList/SessionList.tsx | 10 +++++----- 1 file changed, 5 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 7fc253666..468246608 100644 --- a/frontend/app/components/shared/SessionsTabOverview/components/SessionList/SessionList.tsx +++ b/frontend/app/components/shared/SessionsTabOverview/components/SessionList/SessionList.tsx @@ -99,11 +99,11 @@ function SessionList(props: Props) { const { scrollY } = props; window.scrollTo(0, scrollY); - // if (total === 0) { - // setTimeout(() => { - // props.fetchSessions(null, true); - // }, 300); - // } + if (total === 0 && !loading) { + setTimeout(() => { + props.fetchSessions(null, true); + }, 300); + } // props.fetchMetadata(); return () => {