Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SSHOC
sshoc-marketplace-frontend
Commits
67bcd186
Commit
67bcd186
authored
Sep 16, 2020
by
Stefan Probst
Browse files
fix: remove object-type browse section from home page
parent
c5c79f44
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/components/Browse/Browse.js
View file @
67bcd186
...
...
@@ -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
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment