import React from 'react'; import { createContext } from 'react'; import Pluggy from 'pluggy-js'; export const PluggyContext = createContext({} as Pluggy); export const PluggyProvider = PluggyContext.Provider; export const PluggyConsumer = PluggyContext.Consumer; export const withPluggy = (InnerComponent: any) => { return (props: any) => { return ( {pluggy => { return ; }} ); }; };