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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user