import React, { JSX } from 'react'; import { BffCatalogEntity, CatalogEntityPageProps } from '@redocly/theme/core/types'; import { useCatalogEntityLink } from '@redocly/theme/core/hooks'; import { PeopleIcon } from '@redocly/theme/icons/PeopleIcon/PeopleIcon'; import { CatalogEntityPropertyCard } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard'; import { useThemeHooks } from '@redocly/theme/core/hooks'; import { Button } from '@redocly/theme/components/Button/Button'; import { CatalogAvatar } from '@redocly/theme/components/Catalog/CatalogAvatar'; export type OwnersPropertyProps = { entity: BffCatalogEntity; }; export function OwnersProperty({ entity }: OwnersPropertyProps): JSX.Element { const { useTranslate, usePageProps } = useThemeHooks(); const { translate } = useTranslate(); const { entitiesCatalogConfig } = usePageProps(); const { getEntityLink } = useCatalogEntityLink(entitiesCatalogConfig); const { owners = [] } = entity; return (
{translate('catalog.owners.label', 'Owners')} } content={ <> {owners.map((owner) => { const entityLink = getEntityLink(owner); return ( ); })} } />
); }