@@ -22,7 +22,7 @@ import {defined} from 'sentry/utils';
2222import { getApiUrl } from 'sentry/utils/api/getApiUrl' ;
2323import { getDynamicText } from 'sentry/utils/getDynamicText' ;
2424import { useApiQuery } from 'sentry/utils/queryClient' ;
25- import { useRouter } from 'sentry/utils/useRouter ' ;
25+ import { useLocation } from 'sentry/utils/useLocation ' ;
2626
2727enum SeriesName {
2828 ACCEPTED = 'Accepted' ,
@@ -434,15 +434,15 @@ type Props = {
434434
435435export const CustomerStats = memo (
436436 ( { orgSlug, projectId, dataType, onDemandPeriodStart, onDemandPeriodEnd} : Props ) => {
437- const router = useRouter ( ) ;
437+ const location = useLocation ( ) ;
438438
439439 const dataDatetime = useMemo ( ( ) : DateTimeObject => {
440440 const {
441441 start,
442442 end,
443443 utc : utcString ,
444444 statsPeriod,
445- } = normalizeDateTimeParams ( router . location . query , {
445+ } = normalizeDateTimeParams ( location . query , {
446446 allowEmptyPeriod : true ,
447447 allowAbsoluteDatetime : true ,
448448 allowAbsolutePageDatetime : true ,
@@ -474,7 +474,7 @@ export const CustomerStats = memo(
474474 return {
475475 period : statsPeriod ?? '90d' ,
476476 } ;
477- } , [ router . location . query , onDemandPeriodStart , onDemandPeriodEnd ] ) ;
477+ } , [ location . query , onDemandPeriodStart , onDemandPeriodEnd ] ) ;
478478
479479 const statsEndpointUrl = getApiUrl ( `/organizations/$organizationIdOrSlug/stats_v2/` , {
480480 path : { organizationIdOrSlug : orgSlug } ,
0 commit comments