Skip to content

Commit

Permalink
callback passed to blockUser
Browse files Browse the repository at this point in the history
  • Loading branch information
sharunkumar committed Sep 17, 2023
1 parent 6fbd950 commit 19de46e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/features/user/useUserDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ export function useUserDetails(handle: string) {
throw error;
}

present(buildBlocked(!isBlocked, handle));
present(
buildBlocked(!isBlocked, handle, () => {
dispatch(blockUser(isBlocked!, user.id));
}),
);
}

return { isBlocked, user, blockOrUnblock };
Expand Down

0 comments on commit 19de46e

Please sign in to comment.