using latest sdk version in apps

This commit is contained in:
balzack 2024-07-03 17:14:00 -07:00
parent 3fb2b26c4b
commit f652898d8d
3 changed files with 1237 additions and 480 deletions

View File

@ -31,7 +31,7 @@
"ts-node": "^10.9.2"
},
"dependencies": {
"databag-client-sdk": "^0.0.14",
"databag-client-sdk": "^0.0.18",
"typescript": "^5.5.3"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -12,12 +12,9 @@ class Store implements SqlStore {
};
export function useAppContext() {
const [state, setState] = useState({
sdk: DatabagSDK,
session: Session | null,
});
const [state, setState] = useState({});
const updateState = (value) => {
const updateState = (value: any) => {
setState((s) => ({ ...s, ...value }))
}
@ -27,8 +24,7 @@ export function useAppContext() {
const sdk = new DatabagSDK(null);
const store = new Store();
const session = await sdk.initOfflineStore(store);
console.log(session);
updateState({ sdk, session });
updateState('databag sdk');
};
const actions = {