mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-11-03 20:27:50 +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 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 { BrowseResultGroup, EntityType, Entity } from '../../types.generated';
 | 
			
		||||
import BrowseResultCard from './BrowseResultCard';
 | 
			
		||||
@ -58,7 +58,7 @@ export const BrowseResults = ({
 | 
			
		||||
                            />
 | 
			
		||||
                        </Col>
 | 
			
		||||
                    ))}
 | 
			
		||||
                    {entities.length > 0 && (
 | 
			
		||||
                    {(!(groups && groups.length > 0) || (entities && entities.length > 0)) && (
 | 
			
		||||
                        <EntityList
 | 
			
		||||
                            dataSource={entities}
 | 
			
		||||
                            split={false}
 | 
			
		||||
@ -69,6 +69,7 @@ export const BrowseResults = ({
 | 
			
		||||
                                </>
 | 
			
		||||
                            )}
 | 
			
		||||
                            bordered
 | 
			
		||||
                            locale={{ emptyText: <Empty description="No Entities" /> }}
 | 
			
		||||
                        />
 | 
			
		||||
                    )}
 | 
			
		||||
                    <Col span={24}>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user