Comments → comments on frontend side

This commit is contained in:
igoradamenko
2018-06-19 10:32:02 +03:00
parent 4539415858
commit c32f203f2b
+1 -2
View File
@@ -18,9 +18,8 @@ export default class UserInfo extends Component {
componentWillMount() {
const { user: { id } } = this.props;
// TODO: change Comments to comments
api.getUserComments({ user: id, limit: 10 })
.then(({ Comments = [] }) => this.setState({ comments: Comments }))
.then(({ comments = [] }) => this.setState({ comments }))
.finally(() => this.setState({ isLoading: false }));
}