HomePhabricator
Diffusion Comm 2e65a4c16214

[web] introduce useOnClickReact hook in reaction message utils

Description

[web] introduce useOnClickReact hook in reaction message utils

Summary:
intorduce useOnClickReact hook. useOnClickReact is the web implmentation of the similar function onPressReact introduced in D5780. This function handles the calling of the create reaction message endpoint and then dispatching the results of that to the reducer


Linear Task: ENG-2473

Depends on D6054

Test Plan:
This task will be futher tested in subsequent diffs. I was also able to like/unlike messages in web in my local stack using this hook and some subsequent diffs

Additionally, here is what the Alert looks like if a message fails to go through

Screenshot 2022-12-28 at 12.11.26 PM.png (2×3 px, 1 MB)

Reviewers: atul, tomek, ashoat

Reviewed By: ashoat

Subscribers: ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D6055

Details

Provenance
ginsuAuthored on Dec 29 2022, 1:05 PM
Reviewer
ashoat
Differential Revision
D6055: [web] introduce useOnClickReact hook in reaction message utils
Parents
rCOMM2c8502862fe5: [lib/native] move useCanCreateReactionFromMessage hook from native to lib
Branches
Unknown
Tags
Unknown