MOBILE-4724 calendar: Fix confirm not shown when leaving

main
Dani Palou 2025-01-13 10:28:50 +01:00
parent c51cca9fd3
commit 239ed82697
1 changed files with 2 additions and 0 deletions

View File

@ -26,6 +26,7 @@ import { CoreMainMenuComponentsModule } from '@features/mainmenu/components/comp
import { buildTabMainRoutes } from '@features/mainmenu/mainmenu-tab-routing.module';
import { ADDON_CALENDAR_PAGE_NAME } from './constants';
import { canLeaveGuard } from '@guards/can-leave';
/**
* Build module routes.
@ -55,6 +56,7 @@ function buildRoutes(injector: Injector): Routes {
{
path: 'edit/:eventId',
component: AddonCalendarEditEventPage,
canDeactivate: [canLeaveGuard],
},
...buildTabMainRoutes(injector, {
redirectTo: 'index',