@@ -70,8 +70,6 @@ import useProjects from 'sentry/utils/useProjects';
7070import { useUser } from 'sentry/utils/useUser' ;
7171import { useUserTeams } from 'sentry/utils/useUserTeams' ;
7272import withPageFilters from 'sentry/utils/withPageFilters' ;
73- // eslint-disable-next-line no-restricted-imports
74- import withSentryRouter from 'sentry/utils/withSentryRouter' ;
7573import { getDatasetConfig } from 'sentry/views/dashboards/datasetConfig/base' ;
7674import { checkUserHasEditAccess } from 'sentry/views/dashboards/detail' ;
7775import { DiscoverSplitAlert } from 'sentry/views/dashboards/discoverSplitAlert' ;
@@ -157,13 +155,10 @@ const EMPTY_QUERY_NAME = '(Empty Query Condition)';
157155
158156const shouldWidgetCardChartMemo = ( prevProps : any , props : any ) => {
159157 const selectionMatches = props . selection === prevProps . selection ;
160- const sortMatches =
161- props . location . query [ WidgetViewerQueryField . SORT ] ===
162- prevProps . location . query [ WidgetViewerQueryField . SORT ] ;
163158 const isNotTopNWidget =
164159 props . widget . displayType !== DisplayType . TOP_N && ! defined ( props . widget . limit ) ;
165160 const legendMatches = isEqual ( props . legendOptions , prevProps . legendOptions ) ;
166- return selectionMatches && ( sortMatches || isNotTopNWidget ) && legendMatches ;
161+ return selectionMatches && isNotTopNWidget && legendMatches ;
167162} ;
168163
169164// WidgetCardChartContainer and WidgetCardChart rerenders if selection was changed.
@@ -173,9 +168,7 @@ const MemoizedWidgetCardChartContainer = memo(
173168 WidgetCardChartContainer ,
174169 shouldWidgetCardChartMemo
175170) ;
176- const MemoizedWidgetCardChart = withSentryRouter (
177- memo ( WidgetCardChart , shouldWidgetCardChartMemo )
178- ) ;
171+ const MemoizedWidgetCardChart = memo ( WidgetCardChart , shouldWidgetCardChartMemo ) ;
179172
180173async function fetchDiscoverTotal (
181174 api : Client ,
@@ -927,7 +920,6 @@ function WidgetViewerModal(props: Props) {
927920 loading = { false }
928921 widget = { widget }
929922 selection = { selection }
930- organization = { organization }
931923 onZoom = { ( _evt , chart ) => {
932924 onZoom ( _evt , chart ) ;
933925 setChartUnmodified ( false ) ;
@@ -936,7 +928,6 @@ function WidgetViewerModal(props: Props) {
936928 legendOptions = { {
937929 selected : widgetLegendState . getWidgetSelectionState ( widget ) ,
938930 } }
939- expandNumbers
940931 noPadding
941932 widgetLegendState = { widgetLegendState }
942933 showConfidenceWarning = { widget . widgetType === WidgetType . SPANS }
0 commit comments