1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +00:00

fix(8702): refreshing organization report page does not display the refreshed page (#8713)

This commit is contained in:
Anas
2024-05-07 05:21:19 +02:00
committed by GitHub
parent 0fb352d8ed
commit c051412d41

View File

@@ -23,8 +23,8 @@ export class ReportsHomeComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.homepage$ = this.router.events.pipe( this.homepage$ = this.router.events.pipe(
filter((event) => event instanceof NavigationEnd), filter((event) => event instanceof NavigationEnd),
map((event) => (event as NavigationEnd).urlAfterRedirects.endsWith("/reports")), map((event) => this.isReportsHomepageRouteUrl((event as NavigationEnd).urlAfterRedirects)),
startWith(true), startWith(this.isReportsHomepageRouteUrl(this.router.url)),
); );
this.reports$ = this.route.params.pipe( this.reports$ = this.route.params.pipe(
@@ -61,4 +61,8 @@ export class ReportsHomeComponent implements OnInit {
}, },
]; ];
} }
private isReportsHomepageRouteUrl(url: string): boolean {
return url.endsWith("/reports");
}
} }