mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
fix: run prettier on all file to avoid prettier issue inside PR
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { defineConfig } from 'cypress';
|
||||
import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing';
|
||||
import { defineConfig } from 'cypress';
|
||||
|
||||
export default defineConfig({
|
||||
component: nxComponentTestingPreset(__filename),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
@@ -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),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { appConfig } from './app/app.config';
|
||||
import { bootstrapApplication } from '@angular/platform-browser';
|
||||
import { appConfig } from './app/app.config';
|
||||
|
||||
import { AppComponent } from './app/app.component';
|
||||
|
||||
bootstrapApplication(AppComponent, appConfig).catch((err) =>
|
||||
console.error(err)
|
||||
console.error(err),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user