Load books only when needed not in constructor

This commit is contained in:
aditya.chandel
2025-01-17 22:03:12 -07:00
parent 42ccd2ce4d
commit ad741440b4
4 changed files with 15 additions and 9 deletions
@@ -91,6 +91,7 @@ export class BookBrowserComponent implements OnInit {
private libraryShelfMenuService = inject(LibraryShelfMenuService);
ngOnInit(): void {
this.bookService.loadBooks();
this.sortOptions = SortService.generateSortOptions();
const isAllBooksRoute = this.activatedRoute.snapshot.routeConfig?.path === 'all-books';