Skip to content

Commit

Permalink
Add react-native-storage-wrapper back with the proper patch
Browse files Browse the repository at this point in the history
Also opened up a PR to the author:

mondora/react-native-storage-wrapper#1
  • Loading branch information
Corey Henderson committed May 28, 2019
1 parent 98659e7 commit 483dea8
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 33 deletions.
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"react-native-simple-modal": "^9.0.1",
"react-native-snap-carousel": "^3.8.0",
"react-native-sortable-listview": "^0.2.8",
"react-native-storage-wrapper": "^0.1.0",
"react-native-swipeout": "^2.3.6",
"react-native-vector-icons": "^6.4.2",
"react-navigation": "^3.11.0",
Expand Down
10 changes: 10 additions & 0 deletions patches/react-native-storage-wrapper+0.1.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff --git a/node_modules/react-native-storage-wrapper/src/index.js b/node_modules/react-native-storage-wrapper/src/index.js
index d5e6d37..a58153f 100644
--- a/node_modules/react-native-storage-wrapper/src/index.js
+++ b/node_modules/react-native-storage-wrapper/src/index.js
@@ -1,4 +1,4 @@
-import {AsyncStorage} from "react-native";
+import AsyncStorage from '@react-native-community/async-storage';

module.exports = {
get (key) {
2 changes: 1 addition & 1 deletion src/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
View,
} from 'react-native';

import storage from './components/storage';
import storage from 'react-native-storage-wrapper';
import jwt_decode from 'jwt-decode';
import DeviceInfo from 'react-native-device-info';
import RNGooglePlaces from 'react-native-google-places';
Expand Down
2 changes: 1 addition & 1 deletion src/components/CanvassingPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import OVComponent from '../OVComponent';
import Accordion from 'react-native-collapsible/Accordion';
import { BottomNavigation } from 'react-native-material-ui';
import { NavigationActions } from 'react-navigation';
import storage from '../storage';
import storage from 'react-native-storage-wrapper';
import NetInfo from '@react-native-community/netinfo';
import DeviceInfo from 'react-native-device-info';
import Icon from 'react-native-vector-icons/FontAwesome';
Expand Down
2 changes: 1 addition & 1 deletion src/components/CanvassingSetupPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
import t from 'tcomb-form-native';
import sha1 from 'sha1';
import Modal from 'react-native-simple-modal';
import storage from '../storage';
import storage from 'react-native-storage-wrapper';
import Swipeout from 'react-native-swipeout';
import Icon from 'react-native-vector-icons/FontAwesome';
import SafariView from 'react-native-safari-view';
Expand Down
2 changes: 1 addition & 1 deletion src/components/CreateSurveyPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import OVComponent from '../OVComponent';
import { BottomNavigation } from 'react-native-material-ui';
import t from 'tcomb-form-native';
import Modal from 'react-native-simple-modal';
import storage from '../storage';
import storage from 'react-native-storage-wrapper';
import SortableListView from 'react-native-sortable-listview'
import Permissions from 'react-native-permissions';
import RNGLocation from 'react-native-google-location';
Expand Down
2 changes: 1 addition & 1 deletion src/components/LegacyCanvassingPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { NavigationActions } from 'react-navigation';
import { BottomNavigation } from 'react-native-material-ui';
import { Dropbox } from 'dropbox';
import DeviceInfo from 'react-native-device-info';
import storage from '../storage';
import storage from 'react-native-storage-wrapper';
import NetInfo from '@react-native-community/netinfo';
import Icon from 'react-native-vector-icons/FontAwesome';
import sha1 from 'sha1';
Expand Down
2 changes: 1 addition & 1 deletion src/components/LegacySurveyPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
ScrollView,
} from 'react-native';

import storage from '../storage';
import storage from 'react-native-storage-wrapper';
import { BottomNavigation } from 'react-native-material-ui';
import t from 'tcomb-form-native';
import sha1 from 'sha1';
Expand Down
2 changes: 1 addition & 1 deletion src/components/SettingsPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import RNGooglePlaces from 'react-native-google-places';
import ModalPicker from 'react-native-modal-selector';
import Modal from 'react-native-simple-modal';
import Icon from 'react-native-vector-icons/FontAwesome';
import storage from '../storage';
import storage from 'react-native-storage-wrapper';
import SmLoginPage from '../SmLoginPage';
import { Dropbox } from 'dropbox';
import { google_api_key } from '../../config';
Expand Down
2 changes: 1 addition & 1 deletion src/components/SurveyPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { getEpoch, getPropFromArrObj } from '../../common';

import {BackHandler} from 'react-native';
import { BottomNavigation } from 'react-native-material-ui';
import storage from '../storage';
import storage from 'react-native-storage-wrapper';
import t from 'tcomb-form-native';
import sha1 from 'sha1';

Expand Down
25 changes: 0 additions & 25 deletions src/components/storage.js

This file was deleted.

0 comments on commit 483dea8

Please sign in to comment.