From 9d3aabb00bff4d6d3a60b68b49f7a827f2d286e5 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 13 Sep 2019 16:52:45 +0100 Subject: [PATCH] demo --- src/index.js | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/index.js b/src/index.js index b6e0b91..6f4835f 100644 --- a/src/index.js +++ b/src/index.js @@ -136,29 +136,35 @@ const store = createStore( ); window.store = store; -const persistor = persistStore(store, persistOptions, err => { +/* const persistor = persistStore(store, persistOptions, err => { if (err) { console.log('Unable to load saved SETTINGS'); } }); -window.persistor = persistor; +window.persistor = persistor; */ -/* const persistFilter = { - 'auth': ['authToken'], - 'claims': ['byId', 'claimsByUri'], - 'content': ['positions'], - 'subscriptions': ['enabledChannelNotifications', 'subscriptions'], - 'settings': ['clientSettings'], - 'tags': ['followedTags'], - 'wallet': ['receiveAddress'] + auth: ['authToken'], + claims: ['byId', 'claimsByUri'], + content: ['positions'], + subscriptions: ['enabledChannelNotifications', 'subscriptions'], + settings: ['clientSettings'], + tags: ['followedTags'], + wallet: ['receiveAddress'], }; store.subscribe(() => { - const state = (({ auth, claims, content, subscriptions, settings, tags, wallet }) => - ({ auth, claims, content, subscriptions, settings, tags, wallet }))(store.getState()); + const state = (({ auth, claims, content, subscriptions, settings, tags, wallet }) => ({ + auth, + claims, + content, + subscriptions, + settings, + tags, + wallet, + }))(store.getState()); NativeModules.StatePersistor.update(state, persistFilter); -}); */ +}); // TODO: Find i18n module that is compatible with react-native global.__ = str => str;