Skip to content

Commit

Permalink
Assigning postId and getSurvey method to posts in map view
Browse files Browse the repository at this point in the history
  • Loading branch information
MMwandigha committed Jan 16, 2025
1 parent 07f2a99 commit a9c93aa
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,15 @@ export class PostDetailsComponent extends BaseComponent implements OnChanges, On
this.postId = Number(params['id']);
}
});

//map View
if (this.postFromModal) {
this.post = this.postFromModal;
this.postChanged = false;

//assign post id and get survey
this.postId = this.post.id;
this.getSurvey();
} else {
this.dataSubscription = this.route.data.subscribe((data) => {
this.post = data['post'];
Expand Down

0 comments on commit a9c93aa

Please sign in to comment.