@@ -7,12 +7,15 @@ import {LinkButton} from 'sentry/components/core/button/linkButton';
77import InteractionStateLayer from 'sentry/components/core/interactionStateLayer' ;
88import { Tooltip } from 'sentry/components/core/tooltip' ;
99import ExternalLink from 'sentry/components/links/externalLink' ;
10+ import { pageFiltersToQueryParams } from 'sentry/components/organizations/pageFilters/parse' ;
1011import QuestionTooltip from 'sentry/components/questionTooltip' ;
1112import { IconIssues } from 'sentry/icons' ;
1213import { t , tct } from 'sentry/locale' ;
1314import { space } from 'sentry/styles/space' ;
15+ import type { PageFilters } from 'sentry/types/core' ;
1416import type { Organization } from 'sentry/types/organization' ;
1517import useOrganization from 'sentry/utils/useOrganization' ;
18+ import usePageFilters from 'sentry/utils/usePageFilters' ;
1619import { ORDER } from 'sentry/views/insights/browser/webVitals/components/charts/performanceScoreChart' ;
1720import { PerformanceBadge } from 'sentry/views/insights/browser/webVitals/components/performanceBadge' ;
1821import { VITAL_DESCRIPTIONS } from 'sentry/views/insights/browser/webVitals/components/webVitalDescription' ;
@@ -107,6 +110,7 @@ function VitalMeter({
107110 showTooltip = true ,
108111} : VitalMeterProps ) {
109112 const organization = useOrganization ( ) ;
113+ const { selection} = usePageFilters ( ) ;
110114 const webVitalExists = score !== undefined ;
111115
112116 const formattedMeterValueText =
@@ -128,7 +132,7 @@ function VitalMeter({
128132 < Fragment >
129133 < MeterBarBody >
130134 < StyledIssuesButton
131- to = { getIssuesUrl ( { organization, webVital} ) }
135+ to = { getIssuesUrl ( { organization, webVital, selection } ) }
132136 aria-label = { t ( 'View Performance Issues' ) }
133137 icon = { < IconIssues /> }
134138 size = "xs"
@@ -235,13 +239,16 @@ function VitalContainer({
235239const getIssuesUrl = ( {
236240 organization,
237241 webVital,
242+ selection,
238243} : {
239244 organization : Organization ;
245+ selection : PageFilters ;
240246 webVital : WebVitals ;
241247} ) => {
242248 const query = getIssueQueryFilter ( WEB_VITAL_PERFORMANCE_ISSUES [ webVital ] ) ;
243249 return `/organizations/${ organization . slug } /issues/?${ qs . stringify ( {
244250 query,
251+ ...pageFiltersToQueryParams ( selection ) ,
245252 } ) } `;
246253} ;
247254
0 commit comments