envoc-form
Version:
Envoc form components
15 lines (14 loc) • 605 B
TypeScript
import type { History } from 'history';
import { Navigator as BaseNavigator } from 'react-router-dom';
interface Navigator extends BaseNavigator {
block?: History['block'];
location: Location;
}
interface FormBasedPreventNavigationProps {
promptMessage?: string;
preventNavigate: boolean;
navigator: Navigator;
}
/** Temporary function to allow backwards compatibility with routers that do not use the new Data API */
export default function NewFormBasedPreventNavigation({ promptMessage, preventNavigate, navigator, }: FormBasedPreventNavigationProps): null;
export {};