Skip to content

Commit 3ff2d7f

Browse files
committed
feat: donations via API
1 parent 784c7a5 commit 3ff2d7f

File tree

14 files changed

+978
-2065
lines changed

14 files changed

+978
-2065
lines changed

src/app/articles/list/list.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ <h1 i18n>Articles</h1>
2929
<a [routerLink]="article.routerLink" i18n>details</a>
3030
</p>
3131
<p>
32-
<app-user *ngIf="article.author$ | async as author" [user]="author"></app-user>
32+
<app-user2 *ngIf="article.author$ | async as author" [user]="author"></app-user2>
3333
<span
3434
class="date"
3535
*ngIf="article.date"

src/app/articles/list/list.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import {Component} from '@angular/core';
22
import {ActivatedRoute} from '@angular/router';
3-
import {ArticlesRequest} from '@grpc/spec.pb';
3+
import {APIUser, ArticlesRequest} from '@grpc/spec.pb';
44
import {ArticlesClient} from '@grpc/spec.pbsc';
55
import {PageEnvService} from '@services/page-env.service';
6-
import {APIUser, UserService} from '@services/user';
6+
import {UserService} from '@services/user';
77
import {EMPTY, Observable, of} from 'rxjs';
88
import {catchError, debounceTime, distinctUntilChanged, map, switchMap} from 'rxjs/operators';
99

@@ -43,7 +43,7 @@ export class ListComponent {
4343
}),
4444
map((response) => ({
4545
articles: (response.items ? response.items : []).map((article) => ({
46-
author$: article.authorId !== '0' ? this.userService.getUser$(+article.authorId, {}) : of(null),
46+
author$: article.authorId !== '0' ? this.userService.getUser2$(article.authorId) : of(null),
4747
date: article.date?.toDate(),
4848
description: article.description,
4949
name: article.name,

0 commit comments

Comments
 (0)