Skip to content
Snippets Groups Projects
Commit 4ab28610 authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

Merge branch 'fix/a-la-une-posts' into 'dev'

Fix/a la une posts

See merge request web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client!153
parents d8a36d45 a44912e0
No related branches found
No related tags found
3 merge requests!178release V1.10.0,!154Dev,!153Fix/a la une posts
......@@ -150,6 +150,11 @@ export class PostListComponent implements OnInit {
// Split news on two columns on desktop mode or one column in mobile mode.
private setNews(news: PostWithMeta): void {
if (this.bigNews) {
news.posts = news.posts.filter((elem) => {
return elem.id != this.bigNews.id;
});
}
this.pagination = news.meta.pagination;
const customIndex = this.postsMobileView.length; // For scroll loading, start with previous index.
news.posts.forEach((val, index) => {
......
......@@ -26,9 +26,7 @@ export class PostService {
public getPosts(page: number, tags?: string[]): Observable<PostWithMeta> {
if (!tags) {
return this.http
.get<PostWithMeta>(
`${this.baseUrl}?page=${page}&include=tags,authors&filter=tag:-[${TagEnum.aLaUne},${TagEnum.appels}]`
)
.get<PostWithMeta>(`${this.baseUrl}?page=${page}&include=tags,authors&filter=tag:-[${TagEnum.appels}]`)
.pipe(map((item: PostWithMeta) => new PostWithMeta(item)));
}
let tagsString = '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment