mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-11 09:48:27 +00:00
* Feat: added integration connect and mcp oAuth * Feat: add mcp support to chat * Fix: UI for integrations and logs * Fix: ui * Fix: proxy server * Feat: enhance MCP tool integration and loading functionality * Fix: added header * Fix: Linear integration sync --------- Co-authored-by: Manoj K <saimanoj58@gmail.com>
49 lines
1.2 KiB
TypeScript
49 lines
1.2 KiB
TypeScript
import React, { useMemo } from "react";
|
|
import { Search } from "lucide-react";
|
|
import { IntegrationCard } from "./integration-card";
|
|
|
|
interface IntegrationGridProps {
|
|
integrations: Array<{
|
|
id: string;
|
|
name: string;
|
|
description?: string;
|
|
icon: string;
|
|
slug?: string;
|
|
spec: any;
|
|
}>;
|
|
activeAccountIds: Set<string>;
|
|
showDetail?: boolean;
|
|
}
|
|
|
|
export function IntegrationGrid({
|
|
integrations,
|
|
activeAccountIds,
|
|
}: IntegrationGridProps) {
|
|
const hasActiveAccount = (integrationDefinitionId: string) =>
|
|
activeAccountIds.has(integrationDefinitionId);
|
|
|
|
if (integrations.length === 0) {
|
|
return (
|
|
<div className="mt-20 flex flex-col items-center justify-center">
|
|
<Search className="text-muted-foreground mb-2 h-12 w-12" />
|
|
<h3 className="text-lg font-medium">No integrations found</h3>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5">
|
|
{integrations.map((integration) => {
|
|
const isConnected = hasActiveAccount(integration.id);
|
|
|
|
return (
|
|
<IntegrationCard
|
|
integration={integration}
|
|
isConnected={isConnected}
|
|
/>
|
|
);
|
|
})}
|
|
</div>
|
|
);
|
|
}
|