all state migrated to zustand, jotai removed

splash page now waits on state hydration from db
This commit is contained in:
austinried
2021-08-04 13:13:32 +09:00
parent 33dc0be02b
commit 706e57aa77
23 changed files with 427 additions and 660 deletions

View File

@@ -1,10 +0,0 @@
import { atomWithStorage } from 'jotai/utils'
import { getItem, setItem } from '@app/storage/asyncstorage'
export default <T>(key: string, defaultValue: T) => {
return atomWithStorage<T>(key, defaultValue, {
getItem: async () => (await getItem(key)) || defaultValue,
setItem: setItem,
delayInit: true,
})
}