import React from "react"; import { RouteComponentProps, withRouter } from "react-router"; import { LinkContext } from "./component/LinkContext"; import { InternalNav } from "./InternalNav"; import { InternalUrlResolver } from "./InternalUrlResolver"; interface IWrapperProps

extends RouteComponentProps { C: React.ComponentType

; childProps: P; } class Wrapper

extends React.Component> { render() { let { C, childProps, history } = this.props; return {({ pages }) => }; } } const WrapperWithRouter = withRouter(Wrapper); /** * Higher-order component that exposes the `InternalNav` object as the prop `internalNav`. This allows access to the * internal URI resolver and redirect functionality. * @param C a React component class */ export const withInternalNav =

(C: React.ComponentType

): React.ComponentType>> => (props: P) => ;