From fdb56dac2a4f70e9f504e2769da010e3cbd08bf7 Mon Sep 17 00:00:00 2001 From: Evan Purkhiser Date: Thu, 7 Oct 2021 16:11:17 -0700 Subject: [PATCH] ref(js): useTheme in ProjectBaseSessionsChart --- .../projectDetail/charts/projectBaseSessionsChart.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static/app/views/projectDetail/charts/projectBaseSessionsChart.tsx b/static/app/views/projectDetail/charts/projectBaseSessionsChart.tsx index cbc93dd99b205e..480dfbb53b8524 100644 --- a/static/app/views/projectDetail/charts/projectBaseSessionsChart.tsx +++ b/static/app/views/projectDetail/charts/projectBaseSessionsChart.tsx @@ -1,6 +1,6 @@ import {Component, Fragment} from 'react'; import {InjectedRouter} from 'react-router'; -import {withTheme} from '@emotion/react'; +import {useTheme} from '@emotion/react'; import isEqual from 'lodash/isEqual'; import {Client} from 'app/api'; @@ -34,7 +34,6 @@ type Props = { selection: GlobalSelection; api: Client; organization: Organization; - theme: Theme; onTotalValuesChange: (value: number | null) => void; displayMode: DisplayModes.SESSIONS | DisplayModes.STABILITY; help?: string; @@ -44,7 +43,6 @@ type Props = { function ProjectBaseSessionsChart({ title, - theme, organization, router, selection, @@ -55,6 +53,8 @@ function ProjectBaseSessionsChart({ disablePrevious, query, }: Props) { + const theme = useTheme(); + const {projects, environments, datetime} = selection; const {start, end, period, utc} = datetime; @@ -307,4 +307,4 @@ class Chart extends Component { } } -export default withGlobalSelection(withTheme(ProjectBaseSessionsChart)); +export default withGlobalSelection(ProjectBaseSessionsChart);