Skip to content
Open
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
8 changes: 2 additions & 6 deletions static/app/components/charts/stackedAreaChart.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import {Component} from 'react';

import type {AreaChartProps} from 'sentry/components/charts/areaChart';
import {AreaChart} from 'sentry/components/charts/areaChart';

class StackedAreaChart extends Component<AreaChartProps> {
render() {
return <AreaChart tooltip={{filter: val => val > 0}} {...this.props} stacked />;
}
function StackedAreaChart(props: AreaChartProps) {
return <AreaChart tooltip={{filter: val => val > 0}} {...props} stacked />;
}

export default StackedAreaChart;
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,7 @@ class ReleaseSessionsChart extends Component<Props> {
}
}

getChart():
| React.ComponentType<StackedAreaChart['props']>
| React.ComponentType<AreaChartProps> {
getChart(): React.ComponentType<AreaChartProps> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StackedAreaChart['props'] was AreaChartProps already! Duplicate type constituents. https://typescript-eslint.io/rules/no-duplicate-type-constituents/

const {chartType} = this.props;
switch (chartType) {
case ReleaseComparisonChartType.CRASH_FREE_SESSIONS:
Expand Down
Loading