Authorized.js 288 B

12345678
  1. import CheckPermissions from './CheckPermissions';
  2. const Authorized = ({ children, authority, noMatch = null }) => {
  3. const childrenRender = typeof children === 'undefined' ? null : children;
  4. return CheckPermissions(authority, childrenRender, noMatch);
  5. };
  6. export default Authorized;