Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
EnxDev committed Sep 29, 2024
1 parent 91a8ab9 commit 43bbb9b
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions superset-frontend/src/components/Chart/Chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const defaultProps: Partial<ChartProps> = {
isInView: true,
};

const Styles = styled.div<{ height: number, width?: number }>`
const Styles = styled.div<{ height: number; width?: number }>`
min-height: ${p => p.height}px;
position: relative;
text-align: center;
Expand Down Expand Up @@ -329,17 +329,13 @@ class Chart extends PureComponent<ChartProps, {}> {

const isLoading = chartStatus === 'loading';


if (chartStatus === 'failed') {
return queriesResponse.map(item =>
this.renderErrorMessage(item as ChartErrorType ),
this.renderErrorMessage(item as ChartErrorType),
);
}

if (
errorMessage &&
ensureIsArray(queriesResponse).length === 0
) {
if (errorMessage && ensureIsArray(queriesResponse).length === 0) {
return (
<EmptyStateBig
title={t('Add required control values to preview chart')}
Expand Down Expand Up @@ -386,7 +382,6 @@ class Chart extends PureComponent<ChartProps, {}> {
height={height}
width={width}
>

{isLoading
? this.renderSpinner(databaseName)
: this.renderChartContainer()}
Expand Down

0 comments on commit 43bbb9b

Please sign in to comment.