aboutsummaryrefslogtreecommitdiff
path: root/src/store
diff options
context:
space:
mode:
Diffstat (limited to 'src/store')
-rw-r--r--src/store/reducers/userBlockReducer.ts5
1 files changed, 3 insertions, 2 deletions
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,
);