Add web polyfills

This commit is contained in:
Paul Frazee 2023-01-26 12:36:27 -06:00
parent d6ec627c8c
commit 751dfb20fd
18 changed files with 240 additions and 105 deletions

View file

@ -2,7 +2,7 @@ import {autorun} from 'mobx'
import {Platform} from 'react-native'
import {sessionClient as AtpApi, SessionServiceClient} from '@atproto/api'
import {RootStoreModel} from './models/root-store'
import * as libapi from './lib/api'
import * as apiPolyfill from './lib/api-polyfill'
import * as storage from './lib/storage'
export const LOCAL_DEV_SERVICE =
@ -17,7 +17,7 @@ export async function setupState(serviceUri = DEFAULT_SERVICE) {
let rootStore: RootStoreModel
let data: any
libapi.doPolyfill()
apiPolyfill.doPolyfill()
const api = AtpApi.service(serviceUri) as SessionServiceClient
rootStore = new RootStoreModel(api)