({ permission, children })
| 2 | import { useAuth } from '@/hooks/useAuth' |
| 3 | |
| 4 | export const Available = ({ permission, children }) => { |
| 5 | const { hasPermission } = useAuth() |
| 6 | if (hasPermission(permission)) { |
| 7 | return children |
| 8 | } |
| 9 | } |
| 10 | |
| 11 | Available.propTypes = { |
| 12 | permission: PropTypes.string, |
nothing calls this directly
no test coverage detected