mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-29 19:35:20 +02:00
chore: linting
This commit is contained in:
parent
4dda02c06c
commit
94e834134f
80 changed files with 443 additions and 404 deletions
|
|
@ -42,11 +42,11 @@ export const myAccessAtom = atomWithQuery((get) => {
|
|||
|
||||
/**
|
||||
* Helper function to check if the current user has a specific permission.
|
||||
*
|
||||
*
|
||||
* @param access - The access object from useAtomValue(myAccessAtom)
|
||||
* @param permission - The permission string to check
|
||||
* @returns boolean indicating if the user has the permission
|
||||
*
|
||||
*
|
||||
* @example
|
||||
* const access = useAtomValue(myAccessAtom);
|
||||
* if (canPerform(access, 'manage_members')) { ... }
|
||||
|
|
@ -63,10 +63,10 @@ export function canPerform(
|
|||
/**
|
||||
* Hook wrapper for canPerform that reads from myAccessAtom internally.
|
||||
* Use this if you want to avoid calling useAtomValue(myAccessAtom) separately.
|
||||
*
|
||||
*
|
||||
* @param permission - The permission string to check
|
||||
* @returns boolean indicating if the user has the permission
|
||||
*
|
||||
*
|
||||
* @example
|
||||
* const canManageMembers = usePermissionGate('manage_members');
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue