Skip to content

Commit

Permalink
feat: allow modifying the discussion title on PostsUserPage
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland committed Sep 28, 2024
1 parent 4d59ec4 commit dc9952b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion framework/core/js/src/forum/components/PostsUserPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default class PostsUserPage extends UserPage {
<li>
<div className="PostsUserPage-discussion">
{app.translator.trans('core.forum.user.in_discussion_text', {
discussion: <Link href={app.route.post(post)}>{post.discussion().title()}</Link>,
discussion: <Link href={app.route.post(post)}>{this.discussionTitle(post)}</Link>,
})}
</div>

Expand Down Expand Up @@ -142,4 +142,8 @@ export default class PostsUserPage extends UserPage {

return results;
}

discussionTitle(post: Post): string {
return post.discussion().title();
}
}

0 comments on commit dc9952b

Please sign in to comment.