summaryrefslogtreecommitdiffstats
path: root/ui/src/components/comment-node.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-02-09 11:44:24 -0500
committerDessalines <tyhou13@gmx.com>2020-02-09 11:44:24 -0500
commitfd8814677ec81eff5358c102b6b424ec1c23c2fb (patch)
treeb715aedaf6b06ccf6bcbb10c099c2d794b2c819c /ui/src/components/comment-node.tsx
parent56cd103209605471b27aa5a854cc3b051f2a65f5 (diff)
Live post and comment resorting. Fixes #522
- Moving sorting to utils.
Diffstat (limited to 'ui/src/components/comment-node.tsx')
-rw-r--r--ui/src/components/comment-node.tsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx
index a67b1c35..0e511063 100644
--- a/ui/src/components/comment-node.tsx
+++ b/ui/src/components/comment-node.tsx
@@ -15,6 +15,8 @@ import {
TransferCommunityForm,
TransferSiteForm,
BanType,
+ CommentSortType,
+ SortType,
} from '../interfaces';
import { WebSocketService, UserService } from '../services';
import {
@@ -61,6 +63,8 @@ interface CommentNodeProps {
// TODO is this necessary, can't I get it from the node itself?
postCreatorId?: number;
showCommunity?: boolean;
+ sort?: CommentSortType;
+ sortType?: SortType;
}
export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
@@ -630,6 +634,8 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
moderators={this.props.moderators}
admins={this.props.admins}
postCreatorId={this.props.postCreatorId}
+ sort={this.props.sort}
+ sortType={this.props.sortType}
/>
)}
{/* A collapsed clearfix */}