Skip to content

Commit

Permalink
Reintroduce multiple licenses
Browse files Browse the repository at this point in the history
  • Loading branch information
guergana committed Dec 24, 2024
1 parent 3c83192 commit afabf90
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions client/components/Editors/Resource/Sections/Licenses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ function LicenseList() {

return (
<>
<EditorList kind="license" query={query}>
<EditorList
kind="license"
query={query}
onAddClick={licenseItems.length > 0 ? () => setDialogOpen(true) : null}
>
<EditorHelp helpItem={helpItem} withIcon />
{licenseItems.length > 0 ? (
licenseItems.map(({ index, license }) => (
Expand All @@ -53,7 +57,9 @@ function LicenseList() {
) : (
<NothingToSee
buttonText={t('add-license')}
onAddClick={() => setDialogOpen(true)}
onAddClick={() => {
setDialogOpen(true)
}}
/>
)}
</EditorList>
Expand Down

0 comments on commit afabf90

Please sign in to comment.