aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2021-03-22 09:42:59 +0200
committerSyndamia <kamen.d.mladenov@protonmail.com>2021-03-22 09:42:59 +0200
commitc433aa158ed3921f1de2786eff4b5ff86cabcc94 (patch)
treee599a73ffc225f34f99d594700091ab670b14e10 /src
parentc08d710428ca14b0ebe3d13c16df0aa9b8ba9a93 (diff)
downloadDevHive-Angular-c433aa158ed3921f1de2786eff4b5ff86cabcc94.tar
DevHive-Angular-c433aa158ed3921f1de2786eff4b5ff86cabcc94.tar.gz
DevHive-Angular-c433aa158ed3921f1de2786eff4b5ff86cabcc94.zip
Removed post component index number, since we don't need it anymore
Diffstat (limited to 'src')
-rw-r--r--src/app/components/feed/feed.component.html4
-rw-r--r--src/app/components/post-page/post-page.component.html2
-rw-r--r--src/app/components/post/post.component.ts1
-rw-r--r--src/app/components/profile/profile.component.html4
4 files changed, 5 insertions, 6 deletions
diff --git a/src/app/components/feed/feed.component.html b/src/app/components/feed/feed.component.html
index ee9d89b..a7a5e0d 100644
--- a/src/app/components/feed/feed.component.html
+++ b/src/app/components/feed/feed.component.html
@@ -31,8 +31,8 @@
None of your friends have posted anything yet!<br>
Try refreshing your page!
</div>
- <div *ngFor="let friendPost of posts; let i = index" class="post">
- <app-post [paramId]="friendPost.postId.toString()" [index]="i"></app-post>
+ <div *ngFor="let friendPost of posts" class="post">
+ <app-post [paramId]="friendPost.postId.toString()"></app-post>
</div>
</section>
</main>
diff --git a/src/app/components/post-page/post-page.component.html b/src/app/components/post-page/post-page.component.html
index 590c476..10618c1 100644
--- a/src/app/components/post-page/post-page.component.html
+++ b/src/app/components/post-page/post-page.component.html
@@ -3,7 +3,7 @@
<app-loading *ngIf="!dataArrived"></app-loading>
<main class="centered-content scroll-standalone under-navbar flex-col" *ngIf="dataArrived">
- <app-post [paramId]="postId.toString()" [index]="0"></app-post>
+ <app-post [paramId]="postId.toString()"></app-post>
<form class="card flex-col full-width no-margin-top" [formGroup]="addCommentFormGroup" (ngSubmit)="addComment()">
<textarea rows="1" placeholder="Add a new comment" class="textarea-new-msg faded-slim-border border-bottom-only padding-small margin-bot-bigger" formControlName="newComment"></textarea>
<button class="faded-slim-border padding-small lighter-hover click-effect border-radius-smaller" type="submit">
diff --git a/src/app/components/post/post.component.ts b/src/app/components/post/post.component.ts
index 000fde0..e1d435d 100644
--- a/src/app/components/post/post.component.ts
+++ b/src/app/components/post/post.component.ts
@@ -22,7 +22,6 @@ export class PostComponent implements OnInit, AfterViewInit {
public votesNumber: number;
public timeCreated: string;
@Input() paramId: string;
- @Input() index: number;
@ViewChild('upvote') upvoteBtn: ElementRef;
@ViewChild('downvote') downvoteBtn: ElementRef;
public loggedIn = false;
diff --git a/src/app/components/profile/profile.component.html b/src/app/components/profile/profile.component.html
index 7ba701d..a6082f3 100644
--- a/src/app/components/profile/profile.component.html
+++ b/src/app/components/profile/profile.component.html
@@ -52,8 +52,8 @@
<div class="text-centered" *ngIf="userPosts.length === 0">
{{ user.firstName }} {{ user.lastName }} hasn't posted anything yet!
</div>
- <div *ngFor="let userPost of userPosts; let i = index">
- <app-post [paramId]="userPost.postId.toString()" [index]="i"></app-post>
+ <div *ngFor="let userPost of userPosts">
+ <app-post [paramId]="userPost.postId.toString()"></app-post>
</div>
</section>
</main>