Skip to content
Snippets Groups Projects

Set up HCO.

Merged Defendi Alberto requested to merge fix/authorization into dev
1 file
+ 7
1
Compare changes
  • Side-by-side
  • Inline
@@ -5,11 +5,17 @@ interface WithAuthProps {
allowedRoles: string[];
}
export interface Props extends WithAuthProps {
interface Props extends WithAuthProps {
children: React.ReactNode;
}
/* eslint-disable react/jsx-props-no-spreading */
/**
*
* @param WrappedComponent component to be wrapped by the authentication control.
* This creates a "personal area" in the working implementation.
* @returns {FC<T>} wrapped component.
*/
export const withAuthorization = <T extends WithAuthProps = WithAuthProps>(
WrappedComponent: React.ComponentType<T>,
): FC<T> => {
Loading