diff --git a/react-native/ChatApp/components/AuthenticateNavigation.js b/react-native/ChatApp/components/AuthenticateNavigation.js index 914ffa74ee7bdcb3cb261b6763c2ce4aa2f87919..67d201b6d94ae83846ec27bc1a1a3eeaaa309627 100644 --- a/react-native/ChatApp/components/AuthenticateNavigation.js +++ b/react-native/ChatApp/components/AuthenticateNavigation.js @@ -2,7 +2,8 @@ import React from 'react'; import { NavigationContainer } from '@react-navigation/native'; import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import FontAwesome5 from 'react-native-vector-icons/FontAwesome5'; -import { AsyncStorage, ActivityIndicator, View } from 'react-native'; +import { ActivityIndicator, View } from 'react-native'; +import AsyncStorage from '@react-native-async-storage/async-storage'; import HomeScreen from './HomeScreen' import DiscussionsScreen from './DiscussionsScreen' diff --git a/react-native/ChatApp/components/ListScreen.js b/react-native/ChatApp/components/ListScreen.js index 3f4089442e075f80c90ed9d055906a190d131f3e..d7e7ff01ea176dfe7d5b25d1e260c7ec95b4c4a3 100644 --- a/react-native/ChatApp/components/ListScreen.js +++ b/react-native/ChatApp/components/ListScreen.js @@ -4,7 +4,7 @@ import { FlatList } from 'react-native'; import { ListItem, Icon } from 'react-native-elements'; -import { AsyncStorage } from 'react-native'; +import AsyncStorage from '@react-native-async-storage/async-storage'; class ListScreen extends React.Component { diff --git a/react-native/ChatApp/components/MessagesScreen.js b/react-native/ChatApp/components/MessagesScreen.js index c5d80126476e109673c26fa7dd0b67f2cfe3e9f3..683c8fa7808775b53bed3b48e4c6eb3ae75dbcb0 100644 --- a/react-native/ChatApp/components/MessagesScreen.js +++ b/react-native/ChatApp/components/MessagesScreen.js @@ -1,7 +1,7 @@ import React from 'react'; import { View, Text, StyleSheet, ActivityIndicator } from 'react-native'; import { GiftedChat, utils, Bubble } from 'react-native-gifted-chat'; -import { AsyncStorage } from 'react-native'; +import AsyncStorage from '@react-native-async-storage/async-storage'; const { isSameUser, isSameDay } = utils diff --git a/react-native/ChatApp/package-lock.json b/react-native/ChatApp/package-lock.json index 7d7b1b7dd75798ecbd6a29c974ee671bae562267..fd492981d5fb6a36747cae8e7417e0fea1917dd5 100644 --- a/react-native/ChatApp/package-lock.json +++ b/react-native/ChatApp/package-lock.json @@ -1232,6 +1232,14 @@ } } }, + "@react-native-async-storage/async-storage": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.13.4.tgz", + "integrity": "sha512-P7cbA77XNhUFEBKAIaex17mKI/Db1RQHZVwplagskqzEnpqB+Yi+/l8QeOMr5OJdfmPkBA+V7DOmuWeB8Po6cQ==", + "requires": { + "deep-assign": "^3.0.0" + } + }, "@react-native-community/cli-debugger-ui": { "version": "4.13.1", "resolved": "https://registry.npmjs.org/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-4.13.1.tgz", @@ -3016,6 +3024,14 @@ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, + "deep-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/deep-assign/-/deep-assign-3.0.0.tgz", + "integrity": "sha512-YX2i9XjJ7h5q/aQ/IM9PEwEnDqETAIYbggmdDB3HLTlSgo1CxPsj6pvhPG68rq6SVE0+p+6Ywsm5fTYNrYtBWw==", + "requires": { + "is-obj": "^1.0.0" + } + }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -4696,6 +4712,11 @@ "kind-of": "^3.0.2" } }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" + }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", diff --git a/react-native/ChatApp/package.json b/react-native/ChatApp/package.json index 0a2193bdc525ae0dd1e82dd84c8df85931854808..9593289a53edfb2bb0d358fe307e21722b6676d0 100644 --- a/react-native/ChatApp/package.json +++ b/react-native/ChatApp/package.json @@ -10,6 +10,7 @@ "lint": "eslint ." }, "dependencies": { + "@react-native-async-storage/async-storage": "^1.13.4", "@react-native-community/masked-view": "^0.1.10", "@react-navigation/bottom-tabs": "^5.11.2", "@react-navigation/material-bottom-tabs": "^5.3.10",