diff --git a/src/components/chat/DyadAddIntegration.tsx b/src/components/chat/DyadAddIntegration.tsx index 4674828..2cc3dce 100644 --- a/src/components/chat/DyadAddIntegration.tsx +++ b/src/components/chat/DyadAddIntegration.tsx @@ -6,6 +6,7 @@ import { useAtomValue, atom, useAtom } from "jotai"; import { showError } from "@/lib/toast"; import { useStreamChat } from "@/hooks/useStreamChat"; import { selectedChatIdAtom } from "@/atoms/chatAtoms"; +import { useLoadApp } from "@/hooks/useLoadApp"; interface DyadAddIntegrationProps { node: { @@ -25,8 +26,10 @@ export const DyadAddIntegration: React.FC = ({ const { streamMessage } = useStreamChat(); const [isSetup, setIsSetup] = useAtom(isSetupAtom); const navigate = useNavigate(); + const { provider } = node.properties; const appId = useAtomValue(selectedAppIdAtom); + const { app } = useLoadApp(appId); const selectedChatId = useAtomValue(selectedChatIdAtom); const handleSetupClick = () => { @@ -38,6 +41,45 @@ export const DyadAddIntegration: React.FC = ({ setIsSetup(true); }; + if (app?.supabaseProjectName) { + return ( +
+
+ + + + + + Supabase integration complete + +
+
+ This app is connected to Supabase project:{" "} + + {app.supabaseProjectName} + +
+
+ ); + } + if (isSetup) { return (