diff --git a/js/src/forum/components/DiscussionRenamedPost.js b/js/src/forum/components/DiscussionRenamedPost.js
index 56cdb1545..231637aa4 100644
--- a/js/src/forum/components/DiscussionRenamedPost.js
+++ b/js/src/forum/components/DiscussionRenamedPost.js
@@ -5,9 +5,9 @@ import extractText from '../../common/utils/extractText';
* The `DiscussionRenamedPost` component displays a discussion event post
* indicating that the discussion has been renamed.
*
- * ### Props
+ * ### Attrs
*
- * - All of the props for EventPost
+ * - All of the attrs for EventPost
*/
export default class DiscussionRenamedPost extends EventPost {
icon() {
@@ -22,7 +22,7 @@ export default class DiscussionRenamedPost extends EventPost {
}
descriptionData() {
- const post = this.props.post;
+ const post = this.attrs.post;
const oldTitle = post.content()[0];
const newTitle = post.content()[1];
diff --git a/js/src/forum/components/EventPost.js b/js/src/forum/components/EventPost.js
index a39ec4065..ab5edd51e 100644
--- a/js/src/forum/components/EventPost.js
+++ b/js/src/forum/components/EventPost.js
@@ -8,28 +8,28 @@ import icon from '../../common/helpers/icon';
* event, like a discussion being renamed or stickied. Subclasses must implement
* the `icon` and `description` methods.
*
- * ### Props
+ * ### Attrs
*
- * - All of the props for `Post`
+ * - All of the attrs for `Post`
*
* @abstract
*/
export default class EventPost extends Post {
- attrs() {
- const attrs = super.attrs();
+ elementAttrs() {
+ const attrs = super.elementAttrs();
- attrs.className = (attrs.className || '') + ' EventPost ' + ucfirst(this.props.post.contentType()) + 'Post';
+ attrs.className = (attrs.className || '') + ' EventPost ' + ucfirst(this.attrs.post.contentType()) + 'Post';
return attrs;
}
content() {
- const user = this.props.post.user();
+ const user = this.attrs.post.user();
const username = usernameHelper(user);
const data = Object.assign(this.descriptionData(), {
user,
username: user ? (
-
+
{username}
) : (