mirror of
https://github.com/apache/superset.git
synced 2026-06-02 06:09:21 +00:00
chore: Empty state refactor (#31860)
This commit is contained in:
committed by
GitHub
parent
7482b20f7b
commit
fcd166149c
@@ -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 (
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user