app/frontend/comments/comments.component.tsx in decidim-comments-0.9.3 vs app/frontend/comments/comments.component.tsx in decidim-comments-0.10.0
- old
+ new
@@ -7,11 +7,11 @@
import CommentOrderSelector from "./comment_order_selector.component";
import CommentThread from "./comment_thread.component";
import {
GetCommentsQuery,
- GetCommentsQueryVariables,
+ GetCommentsQueryVariables
} from "../support/schema";
const { I18n } = require("react-i18nify");
interface CommentsProps extends GetCommentsQuery {
@@ -30,12 +30,12 @@
export class Comments extends React.Component<CommentsProps> {
public static defaultProps: any = {
loading: false,
session: null,
commentable: {
- comments: [],
- },
+ comments: []
+ }
};
public render() {
const { commentable: { comments, totalCommentsCount }, reorderComments, orderBy, loading } = this.props;
let commentClasses = "comments";
@@ -140,11 +140,11 @@
export const commentsQuery = require("../queries/comments.query.graphql");
const CommentsWithData: any = graphql<GetCommentsQuery, CommentsProps>(commentsQuery, {
options: {
- pollInterval: 15000,
+ pollInterval: 15000
},
props: ({ ownProps, data }) => {
if (data) {
const { loading, session, commentable, refetch } = data;
@@ -153,15 +153,15 @@
session,
commentable,
orderBy: ownProps.orderBy,
reorderComments: (orderBy: string) => {
return refetch({
- orderBy,
+ orderBy
});
- },
+ }
};
}
- },
+ }
})(Comments);
export interface CommentsApplicationProps extends GetCommentsQueryVariables {
locale: string;
}