mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-07 06:13:40 +00:00
feat(react): add empty state UI for browse when no entities (#2370)
This commit is contained in:
parent
fd0923c445
commit
4a47abf605
@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { Col, Divider, List, Pagination, Row } from 'antd';
|
import { Col, Divider, List, Pagination, Row, Empty } from 'antd';
|
||||||
import { Content } from 'antd/lib/layout/layout';
|
import { Content } from 'antd/lib/layout/layout';
|
||||||
import { BrowseResultGroup, EntityType, Entity } from '../../types.generated';
|
import { BrowseResultGroup, EntityType, Entity } from '../../types.generated';
|
||||||
import BrowseResultCard from './BrowseResultCard';
|
import BrowseResultCard from './BrowseResultCard';
|
||||||
@ -58,7 +58,7 @@ export const BrowseResults = ({
|
|||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
))}
|
))}
|
||||||
{entities.length > 0 && (
|
{(!(groups && groups.length > 0) || (entities && entities.length > 0)) && (
|
||||||
<EntityList
|
<EntityList
|
||||||
dataSource={entities}
|
dataSource={entities}
|
||||||
split={false}
|
split={false}
|
||||||
@ -69,6 +69,7 @@ export const BrowseResults = ({
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
bordered
|
bordered
|
||||||
|
locale={{ emptyText: <Empty description="No Entities" /> }}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user