@firecms/core
Version:
Awesome Firebase/Firestore-based headless open-source CMS
13 lines (12 loc) • 486 B
TypeScript
/**
* Custom hook to handle navigation blocking when there are unsaved changes.
*
* @param when - Indicates whether to block navigation.
* @param onSuccess - Callback invoked when navigation is confirmed.
* @returns An object containing the state of navigation blocking and handlers.
*/
export declare function useNavigationUnsavedChangesDialog(when: boolean, onSuccess: () => void): {
navigationWasBlocked: boolean;
handleCancel: () => void;
handleOk: () => void;
};