Using CordovaSQLiteDriver whenever possible.
This commit is contained in:
1 parent
d0bac1c509
commit
548d4a43cb
1 file changed
+16
-14
@@ -13,21 +13,23 @@ const DbContextProvider: react.FC<{
|
||||
const [ready, setReady] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
const config = {
|
||||
name: 'dyomedea',
|
||||
driver: [
|
||||
CordovaSQLiteDriver._driver,
|
||||
localforage.INDEXEDDB,
|
||||
localforage.WEBSQL,
|
||||
localforage.LOCALSTORAGE,
|
||||
],
|
||||
};
|
||||
const newStore = localforage.createInstance({
|
||||
storeName: 'tracks',
|
||||
...config,
|
||||
localforage.defineDriver(CordovaSQLiteDriver).then(() => {
|
||||
const config = {
|
||||
name: 'dyomedea',
|
||||
driver: [
|
||||
CordovaSQLiteDriver._driver,
|
||||
localforage.INDEXEDDB,
|
||||
localforage.WEBSQL,
|
||||
localforage.LOCALSTORAGE,
|
||||
],
|
||||
};
|
||||
const newStore = localforage.createInstance({
|
||||
storeName: 'tracks',
|
||||
...config,
|
||||
});
|
||||
setStore(newStore);
|
||||
setReady(true);
|
||||
});
|
||||
setStore(newStore);
|
||||
setReady(true);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user