diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-02-02 08:51:03 +0200 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-02-02 08:51:03 +0200 |
| commit | 1db9ba48bf88d169108fa9355172b9e80d98ad28 (patch) | |
| tree | e789fcb11fe6f1fbcdcbed341865e7b76f8f9f36 | |
| parent | f3556d4520479888895a472b0378360d157c6eb8 (diff) | |
| download | DevHive-1db9ba48bf88d169108fa9355172b9e80d98ad28.tar DevHive-1db9ba48bf88d169108fa9355172b9e80d98ad28.tar.gz DevHive-1db9ba48bf88d169108fa9355172b9e80d98ad28.zip | |
Added a back to profile button to post page
| -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']); |
