Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SSHOC
sshoc-marketplace-frontend
Commits
daaa5cd9
Commit
daaa5cd9
authored
Apr 14, 2021
by
Stefan Probst
Browse files
fix: show external ids
parent
5392993e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/screens/item/ItemLayout.tsx
View file @
daaa5cd9
...
...
@@ -144,6 +144,7 @@ export default function ItemLayout({
sourceItemId
=
{
item
.
sourceItemId
}
dateCreated
=
{
item
.
dateCreated
}
dateLastUpdated
=
{
item
.
dateLastUpdated
}
externalIds
=
{
item
.
externalIds
}
/>
</
VStack
>
</
SideColumn
>
...
...
@@ -364,11 +365,11 @@ const ADDITIONAL_HIDDEN_PROPERTIES = ['thumbnail', 'media']
interface
ItemMetadata
{
properties
:
ItemProperties
contributors
:
ItemContributors
licenses
?:
Item
[
'
licenses
'
]
source
?:
Item
[
'
source
'
]
sourceItemId
?:
Item
[
'
sourceItemId
'
]
dateCreated
?:
string
dateLastUpdated
?:
string
externalIds
?:
Item
[
'
externalIds
'
]
}
/**
...
...
@@ -416,6 +417,7 @@ function useItemMetadata({
sourceItemId
,
dateCreated
,
dateLastUpdated
,
externalIds
,
}:
ItemMetadata
)
{
const
metadata
:
any
=
{}
...
...
@@ -601,5 +603,20 @@ function useItemMetadata({
}
}
if
(
Array
.
isArray
(
externalIds
)
&&
externalIds
.
length
>
0
)
{
metadata
.
externalIds
=
(
<
ul
className
=
"py-8 space-y-6"
>
{
externalIds
.
map
((
id
)
=>
{
return
(
<
li
key
=
{
id
.
identifier
}
className
=
"flex space-x-2"
>
<
span
>
{
id
.
identifierService
?.
label
}
:
</
span
>
<
span
>
ID:
{
id
.
identifier
}
</
span
>
</
li
>
)
})
}
</
ul
>
)
}
return
metadata
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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