Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { scrollToFragment } from './scroll-to-fragment';
import { getWindow } from './get-window';
import { changePage } from './change-page';
import { getCurrentLocation } from './get-current-location';
const {
siteBasePath,
siteOrigin,
manageScrollRestoration,
hijackLinks
} = batfishContext.selectedConfig;
// See explanation for this weirdness in prefix-url.js.
// This happens outside the component lifecycle so it can be used during
// rendering of HTML.
prefixUrl._configure(siteBasePath, siteOrigin);
type Props = {
startingPath: string,
startingComponent: React$ComponentType<*>,
startingProps: Object
};
export type RouterState = {
path: string,
PageComponent: React$ComponentType<*>,
pageProps: Object,
location: BatfishLocation
};
class Router extends React.PureComponent {
constructor(props: Props) {