import React from 'react'; import { LinkProps } from 'next/link'; import { NextRouter } from 'next/router'; interface RouterContextType { Link: React.ComponentType; router: NextRouter; } /** * React Context enabling components to use / Router provided by an ancestor component, * rather than directly from 'next/link' or 'next/router'. This is useful when testing or previewing components * (e.g. using Storybook), as importing 'next/link' directly results in errors such as: * * Uncaught Error: No router instance found. * You should only use "next/router" inside the client side of your app. */ declare const RouterContext: React.Context; export default RouterContext;