fix: run prettier on all file to avoid prettier issue inside PR

This commit is contained in:
thomas
2024-01-07 21:41:36 +01:00
parent 3bc793f6b3
commit c8b7c5d4a6
195 changed files with 575 additions and 452 deletions

View File

@@ -5,7 +5,9 @@ import { RouterOutlet } from '@angular/router';
standalone: true,
imports: [RouterOutlet],
selector: 'app-root',
template: `<router-outlet />`,
template: `
<router-outlet />
`,
styles: [''],
})
export class AppComponent {}

View File

@@ -23,7 +23,7 @@ export const appConfig: ApplicationConfig = {
redirectTo: '',
},
],
withComponentInputBinding()
withComponentInputBinding(),
),
],
};

View File

@@ -9,13 +9,25 @@ import { Photo } from '../photo.model';
imports: [DatePipe, RouterLink],
template: `
<img src="{{ photo.url_m }}" alt="{{ photo.title }}" class="image" />
<p><span class="font-bold">Title:</span> {{ photo.title }}</p>
<p><span class="font-bold">Owner:</span> {{ photo.ownername }}</p>
<p><span class="font-bold">Date:</span> {{ photo.datetaken | date }}</p>
<p><span class="font-bold">Tags:</span> {{ photo.tags }}</p>
<p>
<span class="font-bold">Title:</span>
{{ photo.title }}
</p>
<p>
<span class="font-bold">Owner:</span>
{{ photo.ownername }}
</p>
<p>
<span class="font-bold">Date:</span>
{{ photo.datetaken | date }}
</p>
<p>
<span class="font-bold">Tags:</span>
{{ photo.tags }}
</p>
<button
class="border border-black rounded-md px-4 py-2 mt-10"
class="mt-10 rounded-md border border-black px-4 py-2"
routerLink="">
Back
</button>

View File

@@ -47,7 +47,7 @@ export class PhotoStore
private readonly endOfPage$ = this.select(
this.page$,
this.pages$,
(page, pages) => page === pages
(page, pages) => page === pages,
);
readonly vm$ = this.select(
@@ -60,7 +60,7 @@ export class PhotoStore
loading: this.loading$,
error: this.error$,
},
{ debounce: true }
{ debounce: true },
);
ngrxOnStoreInit() {
@@ -82,7 +82,7 @@ export class PhotoStore
this.select({
search: this.search$,
page: this.page$,
})
}),
);
}
@@ -91,21 +91,21 @@ export class PhotoStore
...state,
search,
page: 1,
})
}),
);
readonly nextPage = this.updater(
(state): PhotoState => ({
...state,
page: state.page + 1,
})
}),
);
readonly previousPage = this.updater(
(state): PhotoState => ({
...state,
page: state.page - 1,
})
}),
);
readonly searchPhotos = this.effect<{ search: string; page: number }>(
@@ -123,13 +123,13 @@ export class PhotoStore
});
localStorage.setItem(
PHOTO_STATE_KEY,
JSON.stringify({ search, page })
JSON.stringify({ search, page }),
);
},
(error: unknown) => this.patchState({ error, loading: false })
)
)
)
)
(error: unknown) => this.patchState({ error, loading: false }),
),
),
),
),
);
}

View File

@@ -16,7 +16,7 @@ export class PhotoService {
public searchPublicPhotos(
searchTerm: string,
page: number
page: number,
): Observable<FlickrAPIResponse> {
return this.http.get<FlickrAPIResponse>(
'https://www.flickr.com/services/rest/',
@@ -33,7 +33,7 @@ export class PhotoService {
extras: 'tags,date_taken,owner_name,url_q,url_m',
api_key: 'c3050d39a5bb308d9921bef0e15c437d',
},
}
},
);
}
}

View File

@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />

View File

@@ -1,7 +1,7 @@
import { bootstrapApplication } from '@angular/platform-browser';
import { appConfig } from './app/app.config';
import { AppComponent } from './app/app.component';
import { appConfig } from './app/app.config';
bootstrapApplication(AppComponent, appConfig).catch((err) =>
console.error(err)
console.error(err),
);