(integration: Integration)
| 441 | const items = useMemo(() => groupIntegrations(props.integrations), [props.integrations]); |
| 442 | |
| 443 | const renderEntry = (integration: Integration) => { |
| 444 | const pluginKey = KIND_TO_PLUGIN_KEY[integration.kind] ?? integration.kind; |
| 445 | const plugin = pluginByKind.get(pluginKey); |
| 446 | const SummaryComponent = plugin?.summary; |
| 447 | const slug = String(integration.slug); |
| 448 | const name = integration.name || slug; |
| 449 | return ( |
| 450 | <CardStackEntry key={slug} asChild searchText={`${name} ${slug} ${integration.kind}`}> |
| 451 | <Link |
| 452 | to="/{-$orgSlug}/integrations/$namespace" |
| 453 | params={{ namespace: slug }} |
| 454 | data-testid={`integration-entry-${slug}`} |
| 455 | > |
| 456 | <IntegrationIconWithAccount |
| 457 | icon={integrationPresetIconUrl( |
| 458 | { id: slug, kind: integration.kind, name, url: integration.displayUrl }, |
| 459 | integrationPlugins, |
| 460 | )} |
| 461 | integrationId={slug} |
| 462 | url={integration.displayUrl ?? integrationInferredUrl({ id: slug, name }) ?? undefined} |
| 463 | /> |
| 464 | <CardStackEntryContent> |
| 465 | <CardStackEntryTitle>{name}</CardStackEntryTitle> |
| 466 | <CardStackEntryDescription>{slug}</CardStackEntryDescription> |
| 467 | </CardStackEntryContent> |
| 468 | <CardStackEntryActions> |
| 469 | {SummaryComponent && ( |
| 470 | <Suspense fallback={null}> |
| 471 | <SummaryComponent integrationId={slug} /> |
| 472 | </Suspense> |
| 473 | )} |
| 474 | <IntegrationHealthSummary integration={integration.slug} /> |
| 475 | </CardStackEntryActions> |
| 476 | </Link> |
| 477 | </CardStackEntry> |
| 478 | ); |
| 479 | }; |
| 480 | |
| 481 | const rendered: ReactNode[] = []; |
| 482 | let flatRun: Integration[] = []; |
nothing calls this directly
no test coverage detected