From 25991af7224cd76a8722f0579c00b73a211a84cc Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Mon, 3 Feb 2025 14:22:49 -0600 Subject: Add example account store (#7641) * Add example account store * Format --- src/storage/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/storage/index.ts') diff --git a/src/storage/index.ts b/src/storage/index.ts index ce17d4c36..8ec09eefa 100644 --- a/src/storage/index.ts +++ b/src/storage/index.ts @@ -1,6 +1,7 @@ import {MMKV} from 'react-native-mmkv' +import {Did} from '@atproto/api' -import {Device} from '#/storage/schema' +import {Account, Device} from '#/storage/schema' export * from '#/storage/schema' @@ -73,9 +74,15 @@ export class Storage { */ export const device = new Storage<[], Device>({id: 'bsky_device'}) +/** + * Account data that's specific to the account on this device + */ +export const account = new Storage<[Did], Account>({id: 'bsky_account'}) + if (__DEV__ && typeof window !== 'undefined') { // @ts-ignore window.bsky_storage = { device, + account, } } -- cgit 1.4.1