(integration: Integration)
| 163 | const items = useMemo(() => groupIntegrations(props.integrations), [props.integrations]); |
| 164 | |
| 165 | const renderEntry = (integration: Integration) => { |
| 166 | const pluginKey = KIND_TO_PLUGIN_KEY[integration.kind] ?? integration.kind; |
| 167 | const plugin = pluginByKind.get(pluginKey); |
| 168 | const SummaryComponent = plugin?.summary; |
| 169 | const slug = String(integration.slug); |
| 170 | const name = integration.name || slug; |
| 171 | return ( |
| 172 | <CardStackEntry key={slug} asChild searchText={`${name} ${slug} ${integration.kind}`}> |
| 173 | <Link |
| 174 | to="/{-$orgSlug}/integrations/$namespace" |
| 175 | params={{ namespace: slug }} |
| 176 | data-testid={`integration-entry-${slug}`} |
| 177 | > |
| 178 | <IntegrationIconWithAccount |
| 179 | icon={integrationPresetIconUrl( |
| 180 | { id: slug, kind: integration.kind, name, url: integration.displayUrl }, |
| 181 | integrationPlugins, |
| 182 | )} |
| 183 | integrationId={slug} |
| 184 | url={integration.displayUrl ?? integrationInferredUrl({ id: slug, name }) ?? undefined} |
| 185 | /> |
| 186 | <CardStackEntryContent> |
| 187 | <CardStackEntryTitle>{name}</CardStackEntryTitle> |
| 188 | <CardStackEntryDescription>{slug}</CardStackEntryDescription> |
| 189 | </CardStackEntryContent> |
| 190 | <CardStackEntryActions> |
| 191 | {SummaryComponent && ( |
| 192 | <Suspense fallback={null}> |
| 193 | <SummaryComponent integrationId={slug} /> |
| 194 | </Suspense> |
| 195 | )} |
| 196 | <IntegrationHealthSummary integration={integration.slug} /> |
| 197 | </CardStackEntryActions> |
| 198 | </Link> |
| 199 | </CardStackEntry> |
| 200 | ); |
| 201 | }; |
| 202 | |
| 203 | const rendered: ReactNode[] = []; |
| 204 | let flatRun: Integration[] = []; |
nothing calls this directly
no test coverage detected