diff --git a/web/hooks/use-warn-unsaved-changes.ts b/web/hooks/use-warn-unsaved-changes.ts index 53620aae..04f6a59a 100644 --- a/web/hooks/use-warn-unsaved-changes.ts +++ b/web/hooks/use-warn-unsaved-changes.ts @@ -25,7 +25,7 @@ export const useWarnUnsavedChanges = (hasUnsavedChanges: boolean) => { } window.addEventListener('beforeunload', warnUnsavedChanges) - Router.events.on('routeChangeStart', (href) => beforeRouteHandler(href)) + Router.events.on('routeChangeStart', beforeRouteHandler) return () => { window.removeEventListener('beforeunload', warnUnsavedChanges)