chore: Empty state refactor (#31860)

This commit is contained in:
Maxime Beauchemin
2025-01-22 13:20:38 -08:00
committed by GitHub
parent 7482b20f7b
commit fcd166149c
48 changed files with 530 additions and 658 deletions

View File

@@ -19,7 +19,7 @@
import { useState, useEffect, useMemo } from 'react';
import { ensureIsArray, GenericDataType, styled, t } from '@superset-ui/core';
import Loading from 'src/components/Loading';
import { EmptyStateMedium } from 'src/components/EmptyState';
import { EmptyState } from 'src/components/EmptyState';
import TableView, { EmptyWrapperType } from 'src/components/TableView';
import {
useFilteredTableData,
@@ -124,7 +124,7 @@ export const SamplesPane = ({
if (data.length === 0) {
const title = t('No samples were returned for this dataset');
return <EmptyStateMedium image="document.svg" title={title} />;
return <EmptyState image="document.svg" title={title} />;
}
return (

View File

@@ -26,7 +26,7 @@ import {
getClientErrorObject,
} from '@superset-ui/core';
import Loading from 'src/components/Loading';
import { EmptyStateMedium } from 'src/components/EmptyState';
import { EmptyState } from 'src/components/EmptyState';
import { getChartDataRequest } from 'src/components/Chart/chartAction';
import { ResultsPaneProps, QueryResultInterface } from '../types';
import { SingleQueryResultPane } from './SingleQueryResultPane';
@@ -110,7 +110,7 @@ export const useResultsPane = ({
if (errorMessage) {
const title = t('Run a query to display results');
return Array(queryCount).fill(
<EmptyStateMedium image="document.svg" title={title} />,
<EmptyState image="document.svg" title={title} />,
);
}
@@ -136,7 +136,7 @@ export const useResultsPane = ({
if (resultResp.length === 0) {
const title = t('No results were returned for this query');
return Array(queryCount).fill(
<EmptyStateMedium image="document.svg" title={title} />,
<EmptyState image="document.svg" title={title} />,
);
}
return resultResp