diff --git a/projects/common/src/fm/common-routing.module.ts b/projects/common/src/fm/common-routing.module.ts index d02f375..987ae89 100644 --- a/projects/common/src/fm/common-routing.module.ts +++ b/projects/common/src/fm/common-routing.module.ts @@ -7,6 +7,7 @@ import {NavBarGuard} from './services/nav-bar-guard.service'; import {FullScreenGuard} from './services/full-screen-guard.service'; import {SessionClearedComponent} from './components/session-cleared/session-cleared.component'; import {NotFoundComponent} from './components/not-found/not-found.component'; +import { ProductionGuard } from './services/production-guard.service'; const routes = [ @@ -21,7 +22,7 @@ const routes = [ }, { path: '**', component: NotFoundComponent, - canActivate: [NavBarGuard] + canActivate: [NavBarGuard, ProductionGuard] } ]; diff --git a/projects/common/src/fm/services/production-guard.service.ts b/projects/common/src/fm/services/production-guard.service.ts new file mode 100644 index 0000000..d7e3099 --- /dev/null +++ b/projects/common/src/fm/services/production-guard.service.ts @@ -0,0 +1,11 @@ +import { Injectable } from '@angular/core'; +import { environment } from 'src/environments/environment'; + +@Injectable({ + providedIn: 'root', +}) +export class ProductionGuard { + canActivate(): boolean { + return environment.production; + } +}