Authorized.jsx 319B

12345678910
  1. import React from 'react';
  2. import check from './CheckPermissions';
  3. const Authorized = ({ children, authority, noMatch = null }) => {
  4. const childrenRender = typeof children === 'undefined' ? null : children;
  5. const dom = check(authority, childrenRender, noMatch);
  6. return <>{dom}</>;
  7. };
  8. export default Authorized;