import { withRouter } from 'next/router' ; import * as React from 'react' ; import linkCallbackProps , { LinkProps } from '../../utils/link' ; interface ExtensionLinkProps { publisherName : string ; extensionName : string ; } const ExtensionLink = ( { router , children , ... query } ) => children ( linkCallbackProps ( router , { pathname : '/extension' , query } , { pathname : `/e/${ query . publisherName }.${ query . extensionName }` } , false ) ) ; export default withRouter ( ExtensionLink ) ;