mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 11:25:06 +03:00
20 lines
726 B
TypeScript
20 lines
726 B
TypeScript
import { proxy, snapshot, useSnapshot } from 'valtio'
|
|
|
|
export const githubConnectionConfigPanelState = proxy({
|
|
open: false as boolean,
|
|
setOpen: (open: boolean) => {
|
|
githubConnectionConfigPanelState.open = open
|
|
},
|
|
organizationIntegrationId: undefined as string | undefined,
|
|
setOrganizationIntegrationId: (organizationIntegrationId: string) => {
|
|
githubConnectionConfigPanelState.organizationIntegrationId = organizationIntegrationId
|
|
},
|
|
})
|
|
|
|
export const getGithubConnectionConfigPanelSnapshot = () =>
|
|
snapshot(githubConnectionConfigPanelState)
|
|
|
|
export const useGithubConnectionConfigPanelSnapshot = (
|
|
options?: Parameters<typeof useSnapshot>[1]
|
|
) => useSnapshot(githubConnectionConfigPanelState, options)
|