import { FC } from "react"; // components import { IIntegrationData, GithubAuth } from "components/integration"; // types import { IAppIntegrations } from "types"; type Props = { state: IIntegrationData; provider: string | undefined; handleState: (key: string, valve: any) => void; workspaceSlug: string | undefined; allIntegrations: IAppIntegrations[] | undefined; allIntegrationsError: Error | undefined; allWorkspaceIntegrations: any | undefined; allWorkspaceIntegrationsError: Error | undefined; }; export const GithubConfigure: FC = ({ state, handleState, workspaceSlug, provider, allIntegrations, allIntegrationsError, allWorkspaceIntegrations, allWorkspaceIntegrationsError, }) => { // current integration from all the integrations available const integration = allIntegrations && allIntegrations.length > 0 && allIntegrations.find((_integration) => _integration.provider === provider); // current integration from workspace integrations const workspaceIntegration = integration && allWorkspaceIntegrations && allWorkspaceIntegrations.length > 0 && allWorkspaceIntegrations.find( (_integration: any) => _integration.integration_detail.id === integration.id ); console.log("integration", integration); console.log("workspaceIntegration", workspaceIntegration); return (
Configure
Set up your Github import
); };