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>
This commit is contained in:
João Salavisa
2026-08-13 22:17:24 +01:00
committed by GitHub
parent c5a7fb7527
commit 6352591787
45 changed files with 1000 additions and 265 deletions
@@ -2,10 +2,14 @@
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, wired to `useGitHubEnabled`. */
export function GitHubEnabledControl() {
const { enabled, setEnabled } = useGitHubEnabled();
/**
* 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"