integration-installation.ts13 lines · main
| 1 | import { proxy, snapshot, useSnapshot } from 'valtio' |
| 2 | |
| 3 | export const integrationInstallationState = proxy({ |
| 4 | loading: false as boolean, |
| 5 | setLoading: (boolean: boolean) => { |
| 6 | integrationInstallationState.loading = boolean |
| 7 | }, |
| 8 | }) |
| 9 | |
| 10 | export const getIntegrationInstallation = () => snapshot(integrationInstallationState) |
| 11 | |
| 12 | export const useIntegrationInstallationSnapshot = (options?: Parameters<typeof useSnapshot>[1]) => |
| 13 | useSnapshot(integrationInstallationState, options) |