diff options
| author | Shravya Ramesh <37447613+shravyaramesh@users.noreply.github.com> | 2021-03-05 20:33:51 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-05 20:33:51 -0800 |
| commit | 27925a267e9d279e29a1a1852891e392fdc4b3af (patch) | |
| tree | f77ab55bf3f5cbd6190177058353ef01ad767711 /src/store | |
| parent | 8e4d9135f0645b56665ad23d6de5dd0afa1ef444 (diff) | |
| parent | 59bc015a22a0c50d6c64ecf7501c269dae59bfbd (diff) | |
Merge branch 'master' into badges-people-screen
Diffstat (limited to 'src/store')
| -rw-r--r-- | src/store/actions/user.ts | 12 | ||||
| -rw-r--r-- | src/store/reducers/userBlockReducer.ts | 5 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/store/actions/user.ts b/src/store/actions/user.ts index a9f9d945..4f1da47c 100644 --- a/src/store/actions/user.ts +++ b/src/store/actions/user.ts @@ -174,6 +174,18 @@ export const uploadedSuggestedPeoplePhoto = ( type: setSuggestedPeopleImage.type, payload: {suggestedPeopleImage: imageUri}, }); + } catch (error) { + console.log(error); + } +}; + +export const suggestedPeopleBadgesFinished = (): ThunkAction< + Promise<void>, + RootState, + unknown, + Action<string> +> => async (dispatch) => { + try { dispatch({ type: setSuggestedPeopleLinked.type, payload: {suggested_people_linked: 1}, diff --git a/src/store/reducers/userBlockReducer.ts b/src/store/reducers/userBlockReducer.ts index 90e4a04a..64bdda30 100644 --- a/src/store/reducers/userBlockReducer.ts +++ b/src/store/reducers/userBlockReducer.ts @@ -11,8 +11,9 @@ const userBlockSlice = createSlice({ updateBlockedList: (state, action) => { const {isBlocked, data} = action.payload; - if (!isBlocked) state.blockedUsers.push(data); - else { + if (!isBlocked) { + state.blockedUsers.push(data); + } else { state.blockedUsers = state.blockedUsers.filter( (user) => user.username != data.username, ); |
