aboutsummaryrefslogtreecommitdiff
path: root/src/utils/users.ts
diff options
context:
space:
mode:
authorShravya Ramesh <shravs1208@gmail.com>2021-04-09 14:37:06 -0700
committerShravya Ramesh <shravs1208@gmail.com>2021-04-09 14:37:06 -0700
commit45041863a432ed5ba02f896f0c4f3c23ae7830ed (patch)
tree1b025124211aaade2d0660eed518ca5a20443e20 /src/utils/users.ts
parentbdd1ed17600da7b766e2b0fa97ad4cbf01234819 (diff)
removed chat client inside userlogin
Diffstat (limited to 'src/utils/users.ts')
-rw-r--r--src/utils/users.ts10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/utils/users.ts b/src/utils/users.ts
index ec09198d..7148eb79 100644
--- a/src/utils/users.ts
+++ b/src/utils/users.ts
@@ -22,7 +22,6 @@ import {
ScreenType,
UserType,
} from './../types/types';
-import {connectChatAccount} from './messages';
const loadData = async (dispatch: AppDispatch, user: UserType) => {
await Promise.all([
@@ -43,11 +42,7 @@ const loadData = async (dispatch: AppDispatch, user: UserType) => {
* @param dispatch This is the dispatch object from the redux store
* @param user The user if at all any
*/
-export const userLogin = async (
- dispatch: AppDispatch,
- user: UserType,
- chatClient?,
-) => {
+export const userLogin = async (dispatch: AppDispatch, user: UserType) => {
try {
let localUser = {...user};
if (!user.userId) {
@@ -67,9 +62,6 @@ export const userLogin = async (
AsyncStorage.setItem('username', user.username),
]);
}
- if (chatClient) {
- connectChatAccount(localUser.userId, chatClient, dispatch);
- }
await loadData(dispatch, localUser);
} catch (error) {
console.log(error);