diff --git a/web/app/components/user-info/user-info.jsx b/web/app/components/user-info/user-info.jsx index 1b802858..e3b1ce30 100644 --- a/web/app/components/user-info/user-info.jsx +++ b/web/app/components/user-info/user-info.jsx @@ -2,6 +2,7 @@ import { h, Component } from 'preact'; import { connect } from 'preact-redux'; +import store from 'common/store'; import api from 'common/api'; import LastCommentsList from './last-comments-list'; import Avatar from 'components/avatar-icon'; @@ -21,6 +22,11 @@ class UserInfo extends Component { if (!comments && !isLoading) { fetchComments(id); + api + .getUser() + .then(data => store.set('user', data)) + .catch(() => store.set('user', {})); + api .getUserComments({ user: id, limit: 10 }) .then(({ comments }) => completeFetchComments(id, comments))