From 0f7d0c66ef5fdee54b355a455b63c0e5e2303d38 Mon Sep 17 00:00:00 2001 From: Gururajj77 Date: Sat, 13 Jan 2024 23:59:34 +0530 Subject: [PATCH] added condition to not render logged in user --- src/app/users/users.component.html | 5 +++-- src/app/users/users.component.ts | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/users/users.component.html b/src/app/users/users.component.html index 1e52986..791de59 100644 --- a/src/app/users/users.component.html +++ b/src/app/users/users.component.html @@ -1,5 +1,6 @@
- @for (user of usersWithFollowStatus$ | async; track $index) { + @for (user of usersWithFollowStatus$ | async; track $index) { @if + (user.uid!==uid) {
@@ -35,5 +36,5 @@

{{ user.name }}

}
- } + } }
diff --git a/src/app/users/users.component.ts b/src/app/users/users.component.ts index 91db7ab..bc6d974 100644 --- a/src/app/users/users.component.ts +++ b/src/app/users/users.component.ts @@ -16,7 +16,7 @@ export class UsersComponent { private readonly firestore: FirestoreService = inject(FirestoreService); private readonly auth: Auth = inject(Auth); - + uid: string | undefined = ""; users$: Observable = of([]); followingUids$: Observable = of([]); usersWithFollowStatus$: Observable = of([]); @@ -25,6 +25,7 @@ export class UsersComponent { ngOnInit() { this.getUsersList(); this.checkFollowStatus(); + this.uid = this.auth.currentUser?.uid } checkFollowStatus() {