mirror of
https://github.com/supabase/supabase.git
synced 2026-07-04 10:35:03 +08:00
15 lines
303 B
TypeScript
15 lines
303 B
TypeScript
import { proxy, useSnapshot } from 'valtio'
|
|
|
|
export const menuState = proxy({
|
|
// values
|
|
menuActiveRefId: '',
|
|
// set states
|
|
setMenuActiveRefId: (value) => {
|
|
menuState.menuActiveRefId = value
|
|
},
|
|
})
|
|
|
|
export const useMenuActiveRefId = () => {
|
|
return useSnapshot(menuState).menuActiveRefId
|
|
}
|