Commit 15a053b4 authored by Stefan Probst's avatar Stefan Probst
Browse files

fix: accessibleAt changed to array

parent 30c8ed6a
......@@ -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 (
......
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