vn-verdnaturachat/app/lib/hooks
Reinaldo Neto fa90e4d456
Chore: Hooks - create usePermissions (#4190)
* Chore: Hooks - create custom hook usePermissions

* minor tweak

* Change usage of usePermissiosn on LivechatEditView

* Create getPermissionsSelector

* Simplify selector

* Simplify userRoles

* First render with permissions array length of false

* Move roles state closer to each other

* useSubscription (not working, but looking cool)

* at least it's working now

* working

* cleanup

* solve ts return

* Change it to useSubscriptionRoles only and check for diff on the state

* Remove IAppState

* Minor tweak to work properly useSubscriptionRoles

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2022-06-13 17:36:54 -03:00
..
index.ts Chore: Hooks - create usePermissions (#4190) 2022-06-13 17:36:54 -03:00
useAppSelector.ts Chore: Create useAppSelector hook (#4189) 2022-05-13 12:01:34 -03:00
usePermissions.ts Chore: Hooks - create usePermissions (#4190) 2022-06-13 17:36:54 -03:00