import { SessionContextProvider } from "./SessionContext";

interface IContext {
  children: React.ReactNode;
}

function AppContext(props: IContext): any {
  const { children } = props;
  const providers = [
    SessionContextProvider,
  ];
  const res = providers.reduceRight(
    (acc, CurrVal) => <CurrVal>{acc as any}</CurrVal>,
    children,
  );
  return res as any;
}

export default AppContext;
