diff --git a/superset-frontend/packages/superset-ui-core/src/chart/components/StatefulChart.tsx b/superset-frontend/packages/superset-ui-core/src/chart/components/StatefulChart.tsx index 45575ae3a6c..2e9a4903410 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/components/StatefulChart.tsx +++ b/superset-frontend/packages/superset-ui-core/src/chart/components/StatefulChart.tsx @@ -20,7 +20,6 @@ import { useState, useEffect, useRef, useCallback } from 'react'; import { ParentSize } from '@visx/responsive'; import { t } from '@apache-superset/core/translation'; -import { useTheme } from '@emotion/react'; import { QueryFormData, QueryData, @@ -35,7 +34,7 @@ import getChartBuildQueryRegistry from '../registries/ChartBuildQueryRegistrySin import getChartMetadataRegistry from '../registries/ChartMetadataRegistrySingleton'; import getChartControlPanelRegistry from '../registries/ChartControlPanelRegistrySingleton'; import SuperChart from './SuperChart'; -import { SupersetTheme } from '@apache-superset/core/theme'; + // Using more specific states that align with chart loading process type LoadingState = 'uninitialized' | 'loading' | 'loaded' | 'error'; @@ -186,8 +185,6 @@ export default function StatefulChart(props: StatefulChartProps) { const [error, setError] = useState(); const [formData, setFormData] = useState(); - const theme = useTheme() as SupersetTheme; - const chartClientRef = useRef(); const abortControllerRef = useRef(); @@ -487,7 +484,6 @@ export default function StatefulChart(props: StatefulChartProps) { onRenderSuccess={onRenderSuccess} onRenderFailure={onRenderFailure} hooks={hooks} - theme={theme} /> );