Using CordovaSQLiteDriver whenever possible.

This commit is contained in:
Eric van der Vlist 2022-09-23 23:39:53 +02:00
parent d0bac1c509
commit 548d4a43cb
1 changed files with 16 additions and 14 deletions

View File

@ -13,6 +13,7 @@ const DbContextProvider: react.FC<{
const [ready, setReady] = useState(false); const [ready, setReady] = useState(false);
useEffect(() => { useEffect(() => {
localforage.defineDriver(CordovaSQLiteDriver).then(() => {
const config = { const config = {
name: 'dyomedea', name: 'dyomedea',
driver: [ driver: [
@ -28,6 +29,7 @@ const DbContextProvider: react.FC<{
}); });
setStore(newStore); setStore(newStore);
setReady(true); setReady(true);
});
}, []); }, []);
return ( return (