From 470cce78451752bd5ce8475c6e2ab820809eac22 Mon Sep 17 00:00:00 2001 From: Fatimah Zulfiqar Date: Mon, 25 Nov 2024 14:21:52 +0100 Subject: [PATCH] affiliations: exporting helper functions --- .../contrib/invenioRDM/records/AffiliationsSuggestions.js | 4 ++-- src/lib/elements/contrib/invenioRDM/records/index.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/elements/contrib/invenioRDM/records/AffiliationsSuggestions.js b/src/lib/elements/contrib/invenioRDM/records/AffiliationsSuggestions.js index 32dd4afd..81af02d2 100644 --- a/src/lib/elements/contrib/invenioRDM/records/AffiliationsSuggestions.js +++ b/src/lib/elements/contrib/invenioRDM/records/AffiliationsSuggestions.js @@ -11,7 +11,7 @@ import { Image } from "../../../Image"; import { Header } from "semantic-ui-react"; import Overridable from "react-overridable"; -const makeIdEntry = (identifier) => { +export const makeIdEntry = (identifier) => { let icon, link; switch (identifier.scheme) { @@ -45,7 +45,7 @@ const makeIdEntry = (identifier) => { ); }; -const makeSubheader = (creatibutor, isOrganization) => { +export const makeSubheader = (creatibutor, isOrganization) => { if (isOrganization) { const locationPart = [creatibutor?.location_name, creatibutor?.country_name] ?.filter(Boolean) diff --git a/src/lib/elements/contrib/invenioRDM/records/index.js b/src/lib/elements/contrib/invenioRDM/records/index.js index 01814031..2b623878 100644 --- a/src/lib/elements/contrib/invenioRDM/records/index.js +++ b/src/lib/elements/contrib/invenioRDM/records/index.js @@ -6,4 +6,5 @@ * // under the terms of the MIT License; see LICENSE file for more details. */ -export { AffiliationsSuggestions } from "./AffiliationsSuggestions"; +export { AffiliationsSuggestions, makeIdEntry, makeSubheader } from "./AffiliationsSuggestions"; +