Commit 67bcd186 authored by Stefan Probst's avatar Stefan Probst
Browse files

fix: remove object-type browse section from home page

parent c5c79f44
......@@ -53,7 +53,6 @@ const BrowseContainer = () => {
const activityTypes = facets['activity'] || {}
const keywords = facets['keyword'] || {}
const objectTypes = facets['object-type'] || {}
const isLoading =
!items &&
......@@ -69,18 +68,11 @@ const BrowseContainer = () => {
isLoading={isLoading}
items={items}
keywords={keywords}
objectTypes={objectTypes}
/>
)
}
export const Browse = ({
activityTypes,
isLoading,
items,
keywords,
objectTypes,
}) => (
export const Browse = ({ activityTypes, isLoading, items, keywords }) => (
<Flex>
<div css={{ flex: 1 }}>
<SectionHeading>Browse</SectionHeading>
......@@ -89,7 +81,6 @@ export const Browse = ({
isLoading={isLoading}
/>
<BrowseKeywords keywords={keywords} isLoading={isLoading} />
<BrowseObjectTypes objectTypes={objectTypes} isLoading={isLoading} />
</div>
<SidePanel>
<SectionHeading>Last added</SectionHeading>
......@@ -246,35 +237,6 @@ const BrowseKeywords = ({ keywords, isLoading }) => (
</Section>
)
const BrowseObjectTypes = ({ objectTypes, isLoading }) => (
<Section>
<BrowseSectionHeader>
<BrowseSectionHeading>Browse by item types</BrowseSectionHeading>
<Link to="/browse/object-type">See all</Link>
</BrowseSectionHeader>
<Line />
{isLoading ? (
<LoadingMessage />
) : (
<List>
{Object.entries(objectTypes)
.slice(0, MAX_BROWSE_LINKS)
.map(([objectType, { count }]) => (
<ListItem key={objectType}>
<Link
to={`/search?facets=${JSON.stringify({
'object-type': [objectType],
})}`}
>
{objectType} ({count})
</Link>
</ListItem>
))}
</List>
)}
</Section>
)
const LastAdded = ({ items, isLoading }) => (
<Section>
<BrowseSectionHeader>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment