Skip to content

Commit

Permalink
Remove overly elaborate licenses prop
Browse files Browse the repository at this point in the history
  • Loading branch information
J4bbi committed Dec 9, 2024
1 parent 140adc3 commit 6231cb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class LicenseFieldForm extends Component {
);
})}
</List>
<LimitedLicenseModal
{values.metadata.rights.length === 0 && (<LimitedLicenseModal
searchConfig={searchConfig}
trigger={
<Button type="button" key="standard" icon labelPosition="left">
Expand All @@ -111,9 +111,9 @@ class LicenseFieldForm extends Component {
formikArrayPush(selectedLicense);
}}
action="add"
licenses={values.metadata.rights.length}
serializeLicenses={serializeLicenses}
/>
/>)
}
</Form.Field>
</DndProvider>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export class LimitedLicenseModal extends Component {

render() {
const {
licenses,
trigger,
action,
searchConfig,
Expand All @@ -83,10 +82,6 @@ export class LimitedLicenseModal extends Component {
link: "",
};

// Do not display the add button if a license has been selected
if(licenses)
return null;

const searchApi = new InvenioSearchApi(searchConfig.searchApi);
return (
<Formik
Expand Down

0 comments on commit 6231cb9

Please sign in to comment.