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 Aug 27, 2023
1 parent d5f5c65 commit 769a3cc
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 769a3cc

Please sign in to comment.