Skip to content
Snippets Groups Projects
Commit 4d02b721 authored by ali asaria's avatar ali asaria
Browse files

display error if dataset if empty

parent ac6423ef
Branches
Tags
No related merge requests found
......@@ -6,6 +6,7 @@ import {
Box,
IconButton,
iconButtonClasses,
Alert,
} from '@mui/joy';
import * as chatAPI from '../../lib/transformerlab-api-sdk';
......@@ -42,6 +43,9 @@ const DatasetTable = ({ datasetId }) => {
<>
<Box sx={{ overflow: 'auto', height: '100%' }}>
{isLoading && <CircularProgress />}
{data?.status == 'error' && (
<Alert color="danger">{data?.message}</Alert>
)}
{data &&
data?.data?.['columns'] && ( //Data is loaded as a map of column names to arrays of values
<Table sx={{ tableLayout: 'auto', overflow: 'scroll' }}>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment