(integration: Integration)
| 140 | const items = useMemo(() => groupIntegrations(props.integrations), [props.integrations]); |
| 141 | |
| 142 | const renderEntry = (integration: Integration) => { |
| 143 | const pluginKey = KIND_TO_PLUGIN_KEY[integration.kind] ?? integration.kind; |
| 144 | const plugin = pluginByKind.get(pluginKey); |
| 145 | const SummaryComponent = plugin?.summary; |
| 146 | const slug = String(integration.slug); |
| 147 | const name = integration.name || slug; |
| 148 | return ( |
| 149 | <CardStackEntry key={slug} asChild searchText={`${name} ${slug} ${integration.kind}`}> |
| 150 | <Link |
| 151 | to="/{-$orgSlug}/integrations/$namespace" |
| 152 | params={{ namespace: slug }} |
| 153 | data-testid={`integration-entry-${slug}`} |
| 154 | > |
| 155 | <IntegrationIconWithAccount |
| 156 | icon={integrationPresetIconUrl( |
| 157 | { id: slug, kind: integration.kind, name, url: integration.displayUrl }, |
| 158 | integrationPlugins, |
| 159 | )} |
| 160 | integrationId={slug} |
| 161 | url={integration.displayUrl ?? integrationInferredUrl({ id: slug, name }) ?? undefined} |
| 162 | /> |
| 163 | <CardStackEntryContent> |
| 164 | <CardStackEntryTitle>{name}</CardStackEntryTitle> |
| 165 | <CardStackEntryDescription>{slug}</CardStackEntryDescription> |
| 166 | </CardStackEntryContent> |
| 167 | <CardStackEntryActions> |
| 168 | {SummaryComponent && ( |
| 169 | <Suspense fallback={null}> |
| 170 | <SummaryComponent integrationId={slug} /> |
| 171 | </Suspense> |
| 172 | )} |
| 173 | <IntegrationHealthSummary integration={integration.slug} /> |
| 174 | </CardStackEntryActions> |
| 175 | </Link> |
| 176 | </CardStackEntry> |
| 177 | ); |
| 178 | }; |
| 179 | |
| 180 | const rendered: ReactNode[] = []; |
| 181 | let flatRun: Integration[] = []; |
nothing calls this directly
no test coverage detected