|
@@ -1,27 +1,27 @@
|
|
|
import * as React from 'react';
|
|
|
-import {withTheme} from '@emotion/react';
|
|
|
+import {useTheme} from '@emotion/react';
|
|
|
|
|
|
import BaseChart from 'app/components/charts/baseChart';
|
|
|
import {t} from 'app/locale';
|
|
|
import {Project} from 'app/types';
|
|
|
import {axisLabelFormatter} from 'app/utils/discover/charts';
|
|
|
-import {Theme} from 'app/utils/theme';
|
|
|
|
|
|
import NoEvents from './noEvents';
|
|
|
|
|
|
type BaseChartProps = React.ComponentProps<typeof BaseChart>;
|
|
|
|
|
|
type Props = {
|
|
|
- theme: Theme;
|
|
|
firstEvent: boolean;
|
|
|
stats: Project['stats'];
|
|
|
transactionStats?: Project['transactionStats'];
|
|
|
};
|
|
|
|
|
|
-const Chart = ({theme, firstEvent, stats, transactionStats}: Props) => {
|
|
|
+const Chart = ({firstEvent, stats, transactionStats}: Props) => {
|
|
|
const series: BaseChartProps['series'] = [];
|
|
|
const hasTransactions = transactionStats !== undefined;
|
|
|
|
|
|
+ const theme = useTheme();
|
|
|
+
|
|
|
if (transactionStats) {
|
|
|
const transactionSeries = transactionStats.map(([timestamp, value]) => [
|
|
|
timestamp * 1000,
|
|
@@ -164,4 +164,4 @@ const Chart = ({theme, firstEvent, stats, transactionStats}: Props) => {
|
|
|
);
|
|
|
};
|
|
|
|
|
|
-export default withTheme(Chart);
|
|
|
+export default Chart;
|