mirror of
https://github.com/supabase/supabase.git
synced 2026-10-07 18:35:07 +03:00
14 lines
474 B
TypeScript
14 lines
474 B
TypeScript
import { proxy, snapshot, useSnapshot } from 'valtio'
|
|
|
|
export const integrationInstallationState = proxy({
|
|
loading: false as boolean,
|
|
setLoading: (boolean: boolean) => {
|
|
integrationInstallationState.loading = boolean
|
|
},
|
|
})
|
|
|
|
export const getIntegrationInstallation = () => snapshot(integrationInstallationState)
|
|
|
|
export const useIntegrationInstallationSnapshot = (options?: Parameters<typeof useSnapshot>[1]) =>
|
|
useSnapshot(integrationInstallationState, options)
|