import { Trans } from 'react-i18next' import { Institution } from '../../../../../../types/institution' import { useSubscriptionDashboardContext } from '../../context/subscription-dashboard-context' import OLNotification from '@/features/ui/components/ol/ol-notification' function InstitutionMemberships() { const { institutionMemberships } = useSubscriptionDashboardContext() // memberships is undefined when data failed to load. If user has no memberships, then an empty array is returned if (!institutionMemberships) { return ( Sorry, something went wrong. Subscription information related to institutional affiliations may not be displayed. Please try again later.

} /> ) } if (!institutionMemberships.length) return null return (
{institutionMemberships.map((institution: Institution) => (
, // eslint-disable-next-line react/jsx-key , // eslint-disable-next-line react/jsx-key , ]} />
))}
) } export default InstitutionMemberships