2024-04-27 16:21:14: merge [main:aa6853211bb46e321bc26b3b8132b18c03592910];

This commit is contained in:
txix committed 2024-04-27 16:21:14 +03:00
1 parent a31c44eb7b
commit a6f4c85231
38 files changed
+1966 -60

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import { PropsWithChildren } from 'react'
import { useRole } from '@hooks/useRole.tsx'
import { PermissionKeysType } from '@type/roles.type.ts'
const CanEdit = ({ children }: PropsWithChildren) => {
const { hasPermission } = useRole()
if (hasPermission(PermissionKeysType.write)) {
return <>{children}</>
}
return null
}
export default CanEdit