From bc9c3413bf40b71107420ba549df3d5c26dc79d2 Mon Sep 17 00:00:00 2001 From: kunal Date: Tue, 18 May 2021 10:27:57 -0700 Subject: [PATCH] update conditional - only show skeleton if both groups are loading --- .../insights/InsightHistoryPanel/InsightHistoryPanel.tsx | 2 +- .../src/scenes/onboarding/home/sections/DiscoverInsight.tsx | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/src/scenes/insights/InsightHistoryPanel/InsightHistoryPanel.tsx b/frontend/src/scenes/insights/InsightHistoryPanel/InsightHistoryPanel.tsx index 228b5b01849..3c437b1c25f 100644 --- a/frontend/src/scenes/insights/InsightHistoryPanel/InsightHistoryPanel.tsx +++ b/frontend/src/scenes/insights/InsightHistoryPanel/InsightHistoryPanel.tsx @@ -125,7 +125,7 @@ export const InsightHistoryPanel: React.FC = ({ displa const { reportInsightHistoryItemClicked } = useActions(eventUsageLogic) const [activeTab, setActiveTab] = useState( - insights?.length < 3 && teamInsights?.length > insights?.length + !insightsLoading && insights?.length < 3 && teamInsights?.length > insights?.length ? InsightHistoryType.TEAM : InsightHistoryType.RECENT ) diff --git a/frontend/src/scenes/onboarding/home/sections/DiscoverInsight.tsx b/frontend/src/scenes/onboarding/home/sections/DiscoverInsight.tsx index 80d1b3aca8e..0071d55525d 100644 --- a/frontend/src/scenes/onboarding/home/sections/DiscoverInsight.tsx +++ b/frontend/src/scenes/onboarding/home/sections/DiscoverInsight.tsx @@ -181,9 +181,7 @@ export function DiscoverInsightsModule(): JSX.Element { {(insights.length > 0 || teamInsights.length > 0) && }