Skip to content

Commit

Permalink
fix(8702): refreshing organization report page does not display the r…
Browse files Browse the repository at this point in the history
…efreshed page (#8713)
  • Loading branch information
abarghoud committed May 7, 2024
1 parent 0fb352d commit c051412
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export class ReportsHomeComponent implements OnInit {
ngOnInit() {
this.homepage$ = this.router.events.pipe(
filter((event) => event instanceof NavigationEnd),
map((event) => (event as NavigationEnd).urlAfterRedirects.endsWith("/reports")),
startWith(true),
map((event) => this.isReportsHomepageRouteUrl((event as NavigationEnd).urlAfterRedirects)),
startWith(this.isReportsHomepageRouteUrl(this.router.url)),
);

this.reports$ = this.route.params.pipe(
Expand Down Expand Up @@ -61,4 +61,8 @@ export class ReportsHomeComponent implements OnInit {
},
];
}

private isReportsHomepageRouteUrl(url: string): boolean {
return url.endsWith("/reports");
}
}

0 comments on commit c051412

Please sign in to comment.