2021-02-23 12:45:42 -08:00
|
|
|
import React from 'react';
|
|
|
|
import { Typography, Row, Col } from 'antd';
|
2021-03-09 23:14:52 -08:00
|
|
|
import styled from 'styled-components';
|
|
|
|
|
2021-02-23 12:45:42 -08:00
|
|
|
import { useEntityRegistry } from '../useEntityRegistry';
|
|
|
|
import { BrowseEntityCard } from '../search/BrowseEntityCard';
|
|
|
|
|
2021-03-09 23:14:52 -08:00
|
|
|
const Title = styled(Typography.Text)`
|
|
|
|
&& {
|
|
|
|
margin: 0px 0px 0px 120px;
|
|
|
|
font-size: 32px;
|
|
|
|
color: ${(props) => props.theme.styles['homepage-background-upper-fade']};
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
const EntityGridRow = styled(Row)`
|
|
|
|
padding: 40px 100px;
|
|
|
|
`;
|
|
|
|
|
|
|
|
const BodyContainer = styled.div`
|
|
|
|
background-color: ${(props) => props.theme.styles['homepage-background-lower-fade']};
|
|
|
|
`;
|
2021-02-23 12:45:42 -08:00
|
|
|
|
|
|
|
export const HomePageBody = () => {
|
|
|
|
const entityRegistry = useEntityRegistry();
|
|
|
|
return (
|
2021-03-09 23:14:52 -08:00
|
|
|
<BodyContainer>
|
|
|
|
<Title>
|
2021-02-23 12:45:42 -08:00
|
|
|
<b>Explore</b> your data
|
2021-03-09 23:14:52 -08:00
|
|
|
</Title>
|
|
|
|
<EntityGridRow gutter={[16, 16]}>
|
2021-02-23 12:45:42 -08:00
|
|
|
{entityRegistry.getBrowseEntityTypes().map((entityType) => (
|
2021-04-09 03:30:13 +08:00
|
|
|
<Col xs={24} sm={24} md={8} key={entityType}>
|
2021-02-23 12:45:42 -08:00
|
|
|
<BrowseEntityCard entityType={entityType} />
|
|
|
|
</Col>
|
|
|
|
))}
|
2021-03-09 23:14:52 -08:00
|
|
|
</EntityGridRow>
|
|
|
|
</BodyContainer>
|
2021-02-23 12:45:42 -08:00
|
|
|
);
|
|
|
|
};
|