Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions static/app/utils/routeAnalytics/withRouteAnalytics.spec.tsx

This file was deleted.

26 changes: 0 additions & 26 deletions static/app/utils/routeAnalytics/withRouteAnalytics.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Fragment, useEffect, useMemo} from 'react';
import {Fragment, useMemo} from 'react';
import styled from '@emotion/styled';

import {getSeriesApiInterval} from 'sentry/components/charts/utils';
Expand All @@ -10,8 +10,7 @@ import type {DataCategoryInfo} from 'sentry/types/core';
import type {Project} from 'sentry/types/project';
import {defined} from 'sentry/utils';
import {useApiQuery} from 'sentry/utils/queryClient';
import type {WithRouteAnalyticsProps} from 'sentry/utils/routeAnalytics/withRouteAnalytics';
import withRouteAnalytics from 'sentry/utils/routeAnalytics/withRouteAnalytics';
import useRouteAnalyticsParams from 'sentry/utils/routeAnalytics/useRouteAnalyticsParams';
import {useNavigate} from 'sentry/utils/useNavigate';
import withProjects from 'sentry/utils/withProjects';
import type {UsageSeries} from 'sentry/views/organizationStats/types';
Expand Down Expand Up @@ -204,9 +203,7 @@ function getSpikeDetails({
return actualSpikes;
}

interface EnhancedUsageStatsOrganizationProps
extends WithRouteAnalyticsProps,
UsageStatsOrganizationProps {
interface EnhancedUsageStatsOrganizationProps extends UsageStatsOrganizationProps {
isSingleProject: boolean;
projects: Project[];
subscription: Subscription;
Expand All @@ -229,7 +226,6 @@ function EnhancedUsageStatsOrganization({
dataCategory,
dataCategoryName,
dataCategoryApiName,
setRouteAnalyticsParams,
isSingleProject,
spikeCursor,
clientDiscard,
Expand Down Expand Up @@ -305,20 +301,12 @@ function EnhancedUsageStatsOrganization({
{staleTime: Infinity, retry: false, enabled: spikeThresholdsQueryEnabled}
);

useEffect(() => {
setRouteAnalyticsParams({
subscription,
organization,
is_project_stats: isSingleProject,
has_spike_data: isSingleProject && hasAccurateSpikes,
});
}, [
hasAccurateSpikes,
isSingleProject,
organization,
setRouteAnalyticsParams,
useRouteAnalyticsParams({
subscription,
]);
organization,
is_project_stats: isSingleProject,
has_spike_data: isSingleProject && hasAccurateSpikes,
});

const newEndpointQuery = useMemo(() => {
const query = endpointQuery;
Expand Down Expand Up @@ -496,6 +484,4 @@ const DroppedFromSpikesStat = styled('div')`
font-size: ${p => p.theme.fontSize.md};
`;

export default withRouteAnalytics(
withProjects(withSubscription(EnhancedUsageStatsOrganization))
);
export default withProjects(withSubscription(EnhancedUsageStatsOrganization));
Loading