Files
kandev/apps/web/components/github/github-enabled-control.tsx
T
João Salavisa 6352591787 fix(integrations): scope the enable toggle to its workspace (#2631)
Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 22:17:24 +01:00

22 lines
738 B
TypeScript

"use client";
import { DraftedIntegrationEnabledControl } from "@/components/integrations/drafted-integration-enabled-control";
import { useGitHubEnabled } from "@/hooks/domains/github/use-github-enabled";
import type { IntegrationEnabledControlProps } from "@/components/integrations/integration-enabled-control-props";
/**
* Enable/disable slider for the GitHub integration in `workspaceId`, wired to
* `useGitHubEnabled`.
*/
export function GitHubEnabledControl({ workspaceId }: IntegrationEnabledControlProps) {
const { enabled, setEnabled } = useGitHubEnabled(workspaceId);
return (
<DraftedIntegrationEnabledControl
id="github"
name="GitHub"
enabled={enabled}
persist={setEnabled}
/>
);
}