Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

430 B
Raw Blame
import React from "react";

type PropsWithChildren = Required<React.PropsWithChildren>;

export const composeWrappers = (
  wrappers: React.FunctionComponent<PropsWithChildren>[],
): React.FunctionComponent<PropsWithChildren> => {
  return wrappers.reverse().reduce((Acc, Current): React.FunctionComponent<PropsWithChildren> => {
    return (props) => (
      <Current>
        <Acc {...props} />
      </Current>
    );
  });
};