mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 19:05:06 +03:00
14 lines
439 B
TypeScript
14 lines
439 B
TypeScript
import { proxy, snapshot, useSnapshot } from 'valtio'
|
|
|
|
export const storageExplorerState = proxy({
|
|
isSearching: false,
|
|
setIsSearching: (bool: boolean) => {
|
|
storageExplorerState.isSearching = bool
|
|
},
|
|
})
|
|
|
|
export const getStorageExplorerStateSnapshot = () => snapshot(storageExplorerState)
|
|
|
|
export const useStorageExplorerStateSnapshot = (options?: Parameters<typeof useSnapshot>[1]) =>
|
|
useSnapshot(storageExplorerState, options)
|