mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-13 06:13:03 -05:00
fix: run prettier on all file to avoid prettier issue inside PR
This commit is contained in:
@@ -4,7 +4,7 @@ import { availableBooks } from './book.model';
|
||||
|
||||
export const bookGuard = (
|
||||
route: ActivatedRouteSnapshot,
|
||||
router = inject(Router)
|
||||
router = inject(Router),
|
||||
) => {
|
||||
const searchParam = route.queryParams?.['book'].toLowerCase();
|
||||
|
||||
@@ -13,7 +13,7 @@ export const bookGuard = (
|
||||
availableBooks.some(
|
||||
(b) =>
|
||||
b.author.toLowerCase().includes(searchParam) ||
|
||||
b.name.toLowerCase().includes(searchParam)
|
||||
b.name.toLowerCase().includes(searchParam),
|
||||
);
|
||||
|
||||
return isBookAvailable || router.parseUrl('no-result');
|
||||
|
||||
@@ -2,7 +2,9 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
template: ` <div>No book found for this search</div> `,
|
||||
template: `
|
||||
<div>No book found for this search</div>
|
||||
`,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export default class ShelfComponent {}
|
||||
|
||||
@@ -25,8 +25,8 @@ export default class ShelfComponent {
|
||||
availableBooks.filter(
|
||||
(b) =>
|
||||
b.name.toLowerCase().includes(param) ||
|
||||
b.author.toLowerCase().includes(param)
|
||||
)
|
||||
)
|
||||
b.author.toLowerCase().includes(param),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user