From 16a6f82e8f5194918768181333d2cbcad541a203 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Mon, 10 Aug 2020 00:40:05 -0400 Subject: [PATCH] replace href and config with route on PostPreview (which is unused, also, update the component --- js/src/forum/components/PostPreview.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/src/forum/components/PostPreview.js b/js/src/forum/components/PostPreview.js index 08c9544af..e8cd5fe0f 100644 --- a/js/src/forum/components/PostPreview.js +++ b/js/src/forum/components/PostPreview.js @@ -7,18 +7,18 @@ import highlight from '../../common/helpers/highlight'; * The `PostPreview` component shows a link to a post containing the avatar and * username of the author, and a short excerpt of the post's content. * - * ### Props + * ### Attrs * * - `post` */ export default class PostPreview extends Component { view() { - const post = this.props.post; + const post = this.attrs.post; const user = post.user(); - const excerpt = highlight(post.contentPlain(), this.props.highlight, 300); + const excerpt = highlight(post.contentPlain(), this.attrs.highlight, 300); return ( - + {avatar(user)} {username(user)} {excerpt}