mg-library 1.0.278 → 1.0.280
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/functions.js +12 -4
- package/package.json +1 -1
package/functions.js
CHANGED
|
@@ -173,9 +173,17 @@ export function getTimeForExposition(date) {
|
|
|
173
173
|
// Local Storage
|
|
174
174
|
|
|
175
175
|
export async function writeToLocalStorage(key, value) {
|
|
176
|
-
|
|
176
|
+
try {
|
|
177
|
+
await AsyncStorage.setItem(key,value);
|
|
178
|
+
} catch (error) {
|
|
179
|
+
console.log(error);
|
|
180
|
+
}
|
|
177
181
|
}
|
|
178
182
|
|
|
179
|
-
export async function readFromLocalStorage(key) {
|
|
180
|
-
|
|
181
|
-
|
|
183
|
+
export async function readFromLocalStorage(key) {ç
|
|
184
|
+
try {
|
|
185
|
+
return await AsyncStorage.getItem(key);
|
|
186
|
+
} catch (error) {
|
|
187
|
+
console.log(error);
|
|
188
|
+
}
|
|
189
|
+
}
|