mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 02:45:07 +03:00
10 lines
338 B
TypeScript
10 lines
338 B
TypeScript
import * as KeyValueStore from 'effect/unstable/persistence/KeyValueStore'
|
|
import { Atom } from 'effect/unstable/reactivity'
|
|
|
|
const keyValueStoreLayer =
|
|
typeof window === 'undefined'
|
|
? KeyValueStore.layerMemory
|
|
: KeyValueStore.layerStorage(() => window.localStorage)
|
|
|
|
export const tabsRuntime = Atom.runtime(keyValueStoreLayer)
|