diff options
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, ); |
