feat(web): add per-integration enable/disable toggle (#2364)

Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
This commit is contained in:
Clément Fiere
2026-08-07 20:01:07 +02:00
committed by GitHub
parent 58f6533ab1
commit 312dc0657f
54 changed files with 2504 additions and 257 deletions
@@ -0,0 +1,18 @@
"use client";
import { useIntegrationEnabled } from "../integrations/use-integration-enabled";
const STORAGE_KEY = "kandev:github:enabled:v1";
const LEGACY_KEY_PREFIX = "kandev:github:enabled:";
const SYNC_EVENT = "kandev:github:enabled-changed";
/**
* Install-wide enable/disable state for the GitHub integration.
*
* Backed by `localStorage` (key `kandev:github:enabled:v1`), synced across
* browser tabs and across the own-settings-page and index-page sliders.
* Defaults to `true` when no value has ever been persisted.
*/
export function useGitHubEnabled() {
return useIntegrationEnabled(STORAGE_KEY, LEGACY_KEY_PREFIX, SYNC_EVENT);
}