Files
template-showcase/src/widgets/enable-card/ui/EnableCard.tsx
T

18 lines
621 B
TypeScript

import type { ServiceType } from '@conusai-sdk/api'
import { serviceCatalogEntry } from '@/shared/api'
/**
* "Link <service> to enable": the text comes from the platform's service catalog
* (plan D13), so the card never carries copy of its own. When the platform read
* fails the card still renders, without the catalog details.
*/
export async function EnableCard({ service }: { service: ServiceType }) {
const entry = await serviceCatalogEntry(service)
return (
<aside>
<p>Link {entry?.display_name ?? service} to enable this.</p>
{entry ? <p>{entry.description}</p> : null}
</aside>
)
}