Authorized.js 288 Bytes
Newer Older
ddcat1115's avatar
ddcat1115 committed
1 2
import CheckPermissions from './CheckPermissions';

afc163's avatar
afc163 committed
3 4 5 6
const Authorized = ({ children, authority, noMatch = null }) => {
  const childrenRender = typeof children === 'undefined' ? null : children;
  return CheckPermissions(authority, childrenRender, noMatch);
};
ddcat1115's avatar
ddcat1115 committed
7 8

export default Authorized;