diff options
Diffstat (limited to 'src/state')
-rw-r--r-- | src/state/index.ts | 2 | ||||
-rw-r--r-- | src/state/models/root-store.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/state/index.ts b/src/state/index.ts index 78c14714f..0716ab592 100644 --- a/src/state/index.ts +++ b/src/state/index.ts @@ -4,8 +4,8 @@ import {RootStoreModel} from './models/root-store' import * as libapi from './lib/api' import * as storage from './lib/storage' +export const DEFAULT_SERVICE = 'http://localhost:2583' const ROOT_STATE_STORAGE_KEY = 'root' -const DEFAULT_SERVICE = 'http://localhost:2583' const STATE_FETCH_INTERVAL = 15e3 export async function setupState() { diff --git a/src/state/models/root-store.ts b/src/state/models/root-store.ts index 68b042d68..717caa4a9 100644 --- a/src/state/models/root-store.ts +++ b/src/state/models/root-store.ts @@ -74,7 +74,7 @@ export class RootStoreModel { } } -const throwawayInst = new RootStoreModel(AtpApi.service('http://localhost')) // this will be replaced by the loader +const throwawayInst = new RootStoreModel(AtpApi.service('http://localhost')) // this will be replaced by the loader, we just need to supply a value at init const RootStoreContext = createContext<RootStoreModel>(throwawayInst) export const RootStoreProvider = RootStoreContext.Provider export const useStores = () => useContext(RootStoreContext) |