1
0
mirror of https://github.com/flarum/core.git synced 2025-08-05 16:07:34 +02:00

Rename CommentPostPreview -> TextFormatterPreview

The idea is to be a bit more precise as to what this component does.
Also, there's already the `PostPreview` component which is actually a
link *to* a preview. Very confusing.
This commit is contained in:
Franz Liedke
2020-09-11 16:25:36 +02:00
parent d7ef260c54
commit 6b5bdb5c41
2 changed files with 3 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ import EditPostComposer from './EditPostComposer';
import ItemList from '../../common/utils/ItemList';
import listItems from '../../common/helpers/listItems';
import Button from '../../common/components/Button';
import CommentPostPreview from './CommentPostPreview';
import TextFormatterPreview from './TextFormatterPreview';
/**
* The `CommentPost` component displays a standard `comment`-typed post. This
@@ -50,7 +50,7 @@ export default class CommentPost extends Post {
<header className="Post-header">
<ul>{listItems(this.headerItems().toArray())}</ul>
</header>,
<div className="Post-body">{this.isEditing() ? <CommentPostPreview /> : m.trust(this.attrs.post.contentHtml())}</div>,
<div className="Post-body">{this.isEditing() ? <TextFormatterPreview /> : m.trust(this.attrs.post.contentHtml())}</div>,
]);
}

View File

@@ -2,7 +2,7 @@
import Component from '../../common/Component';
export default class CommentPostPreview extends Component {
export default class TextFormatterPreview extends Component {
view() {
return <div className="Post-preview" />;
}