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
15a053b4
Commit
15a053b4
authored
Sep 16, 2020
by
Stefan Probst
Browse files
fix: accessibleAt changed to array
parent
30c8ed6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/components/ItemSidebar/ItemSidebar.js
View file @
15a053b4
...
...
@@ -24,6 +24,8 @@ const ItemSidebar = ({ resource, itemCategories }) => {
},
{})
const
type
=
itemCategories
?.[
resource
.
category
]
||
'
Resource
'
const
[
url
]
=
resource
.
accessibleAt
||
[]
if
(
!
url
)
return
null
const
links
=
[
{
...
...
@@ -41,16 +43,8 @@ const ItemSidebar = ({ resource, itemCategories }) => {
/>
<
/
>
),
path
:
resource
.
accessibleAt
,
path
:
url
,
},
...(
resource
.
olderVersions
||
[]).
map
(({
id
,
label
,
version
})
=>
({
label
:
`
${
label
}
${
version
}
`
,
path
:
`/
${
resource
.
category
}
s/
${
id
}
`
,
})),
...(
resource
.
newerVersions
||
[]).
map
(({
id
,
label
,
version
})
=>
({
label
:
`
${
label
}
${
version
}
`
,
path
:
`/
${
resource
.
category
}
s/
${
id
}
`
,
})),
]
return
(
...
...
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