forked from github/plane
a1d6c40627
* fix: show window closing alert only when page is not saved * chore: Refactor useReloadConfirmations hook - Removed the `message` parameter, as it was not being used and not supported in modern browsers - Changed the `isActive` flag to a temporary flag and added a TODO comment to remove it later. - Implemented the `handleRouteChangeStart` function to handle route change events and prompt the user with a confirmation dialog before leaving the page. - Updated the dependencies of the `handleBeforeUnload` and `handleRouteChangeStart` callbacks. - Added event listeners for `beforeunload` and `routeChangeStart` events in the `useEffect` hook. - Cleaned up the event listeners in the cleanup function of the `useEffect` hook. fix: Fix reload confirmations in PageDetailsPage - Removed the TODO comment regarding fixing reload confirmations with MobX, as it has been resolved. - Passed the `pageStore?.isSubmitting === "submitting"` flag to the `useReloadConfirmations` hook instead of an undefined message. This commit refactors the `useReloadConfirmations` hook to improve its functionality and fixes the usage in the `PageDetailsPage` component. --------- Co-authored-by: Palanikannan1437 <73993394+Palanikannan1437@users.noreply.github.com> |
||
---|---|---|
.. | ||
components | ||
constants | ||
contexts | ||
helpers | ||
hooks | ||
layouts | ||
lib | ||
pages | ||
public | ||
services | ||
store | ||
styles | ||
.env.example | ||
.eslintrc.js | ||
.prettierignore | ||
.prettierrc | ||
Dockerfile.dev | ||
Dockerfile.web | ||
google.d.ts | ||
manifest.json | ||
next-env.d.ts | ||
next.config.js | ||
package.json | ||
postcss.config.js | ||
sentry.client.config.js | ||
sentry.edge.config.js | ||
sentry.properties | ||
sentry.server.config.js | ||
tailwind.config.js | ||
tsconfig.json |