Skip to content

Commit

Permalink
Update gating by tab instead of by module
Browse files Browse the repository at this point in the history
  • Loading branch information
Initsogar committed Jan 16, 2025
1 parent 74c1c53 commit 5ca40dd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -164,7 +164,7 @@ const StatsLocations: React.FC< StatsModuleLocationsProps > = ( { query, summary
{ isRequestingData && (
<StatsCardSkeleton isLoading={ isRequestingData } title={ title } type={ 3 } withHero />
) }
{ ( ( ! isRequestingData && ! isError && hasLocationData ) || shouldGateStatsModule ) && (
{ ( ( ! isRequestingData && ! isError && hasLocationData ) || shouldGate ) && (
// show data or an overlay
<>
{ /* @ts-expect-error TODO: Refactor StatsListCard with TypeScript. */ }
@@ -222,7 +222,7 @@ const StatsLocations: React.FC< StatsModuleLocationsProps > = ( { query, summary
/>
</>
) }
{ ! isRequestingData && ! hasLocationData && ! shouldGateStatsModule && (
{ ! isRequestingData && ! hasLocationData && ! shouldGate && (
// show empty state
<StatsCard
title={ translate( 'Locations' ) }

0 comments on commit 5ca40dd

Please sign in to comment.