mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-24 00:47:50 +01:00
update conditional - only show skeleton if both groups are loading
This commit is contained in:
parent
b5421a8f8e
commit
bc9c3413bf
@ -125,7 +125,7 @@ export const InsightHistoryPanel: React.FC<InsightHistoryPanelProps> = ({ 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
|
||||
)
|
||||
|
@ -181,9 +181,7 @@ export function DiscoverInsightsModule(): JSX.Element {
|
||||
</Title>
|
||||
<Divider />
|
||||
<Skeleton
|
||||
loading={
|
||||
(insightsLoading && insights.length === 0) || (teamInsightsLoading && teamInsights.length === 0)
|
||||
}
|
||||
loading={insightsLoading && insights.length === 0 && teamInsightsLoading && teamInsights.length === 0}
|
||||
>
|
||||
<Space direction={'vertical'} className={'home-page'} size={'small'}>
|
||||
{(insights.length > 0 || teamInsights.length > 0) && <RecentInsightList />}
|
||||
|
Loading…
Reference in New Issue
Block a user