You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Getting user permissions require some coding, which may duplicate code with time.
Describe the solution you'd like
Create a hook usePermissions() which should return an array of logged in user permissions.
// to avoid thisconst{ user }=useContext(AuthContext);const{ data }=useQuery("user-profiles",()=>api.get(`users/${user?.id}`),{enabled: !!user?.id,});console.log("profiles ==> ",data?.data.profiles);
Describe alternatives you've considered
Solution would be:
Is your feature request related to a problem? Please describe.
Getting user permissions require some coding, which may duplicate code with time.
Describe the solution you'd like
Create a hook
usePermissions()
which should return an array of logged in user permissions.Describe alternatives you've considered
Solution would be:
Additional context
No.
The text was updated successfully, but these errors were encountered: