File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
nav/secondary/sections/explore Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -740,7 +740,7 @@ export function useMetricsPanelAnalytics({
740740 return ;
741741 }
742742
743- if ( metricSamplesTableResult . result . isFetching ) {
743+ if ( metricSamplesTableResult . result . isFetching || ! dataScanned ) {
744744 return ;
745745 }
746746
Original file line number Diff line number Diff line change @@ -30,21 +30,25 @@ export function ExploreSecondaryNav() {
3030 perPage : MAX_STARRED_QUERIES_DISPLAYED ,
3131 } ) ;
3232
33+ const userPlatforms = useMemo (
34+ ( ) =>
35+ Array . from (
36+ new Set ( projects . map ( project => ( project . platform as PlatformKey ) || 'unknown' ) )
37+ ) . sort ( ) ,
38+ [ projects ]
39+ ) ;
40+
3341 const hasMetricsSupportedPlatform = projects . some ( project => {
3442 const platform = project . platform || 'unknown' ;
3543 return Array . from ( limitedMetricsSupportPrefixes ) . some ( prefix =>
3644 platform . startsWith ( prefix )
3745 ) ;
3846 } ) ;
3947
40- const userPlatforms = useMemo (
41- ( ) => [
42- ...new Set ( projects . map ( project => ( project . platform as PlatformKey ) || 'unknown' ) ) ,
43- ] ,
44- [ projects ]
45- ) ;
46-
4748 useEffect ( ( ) => {
49+ if ( userPlatforms . length === 0 ) {
50+ return ;
51+ }
4852 trackAnalytics ( 'metrics.nav.rendered' , {
4953 organization,
5054 metrics_tab_visible : hasMetricsSupportedPlatform ,
You can’t perform that action at this time.
0 commit comments