import hoistNonReactStatics from "hoist-non-react-statics"; import * as React from "react"; import { SlideshowContext, SlideshowContextType } from "./SlideshowContext"; export type SlideshowProps = { room: any; }; const withSlideshow =

(Component: React.ComponentType

) => { type WrappedComponentPropsExceptProvided = Exclude< keyof P, keyof SlideshowProps >; type ForwardedProps = Pick; return hoistNonReactStatics( class WithShortcutComponent extends React.Component { render() { return ( {(SlideshowContext: SlideshowContextType) => { const { room } = SlideshowContext; return ( <> ); }} ); } }, Component ); }; export default withSlideshow;