Authorized.js 288 Bytes
Newer Older
sin's avatar
sin committed
1 2 3 4 5 6 7 8
import CheckPermissions from './CheckPermissions';

const Authorized = ({ children, authority, noMatch = null }) => {
  const childrenRender = typeof children === 'undefined' ? null : children;
  return CheckPermissions(authority, childrenRender, noMatch);
};

export default Authorized;