diff options
Diffstat (limited to 'src/DevHive.Angular')
| -rw-r--r-- | src/DevHive.Angular/src/app/components/post-page/post-page.component.html | 1 | ||||
| -rw-r--r-- | src/DevHive.Angular/src/app/components/post-page/post-page.component.ts | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/DevHive.Angular/src/app/components/post-page/post-page.component.html b/src/DevHive.Angular/src/app/components/post-page/post-page.component.html index 32326b9..5d29e5d 100644 --- a/src/DevHive.Angular/src/app/components/post-page/post-page.component.html +++ b/src/DevHive.Angular/src/app/components/post-page/post-page.component.html @@ -1,6 +1,7 @@ <div id="content"> <div class="many-buttons"> <button class="submit-btn" type="submit" (click)="backToFeed()">ᐊ Back to feed</button> + <button class="submit-btn" type="submit" (click)="backToProfile()">ᐊ Back to profile</button> </div> <app-post [paramId]="postId.toString()"></app-post> <div class="many-buttons" *ngIf="editable"> diff --git a/src/DevHive.Angular/src/app/components/post-page/post-page.component.ts b/src/DevHive.Angular/src/app/components/post-page/post-page.component.ts index 9974d90..ef149a0 100644 --- a/src/DevHive.Angular/src/app/components/post-page/post-page.component.ts +++ b/src/DevHive.Angular/src/app/components/post-page/post-page.component.ts @@ -58,6 +58,10 @@ export class PostPageComponent implements OnInit { this._router.navigate(['/']); } + backToProfile(): void { + this._router.navigate(['/profile/' + this.post.creatorUsername]); + } + editPost(): void { if (this._tokenService.getTokenFromSessionStorage() === '') { this._router.navigate(['/login']); |
