From 030382320576319c356b2f95e387ef5360a2e46a Mon Sep 17 00:00:00 2001 From: igoradamenko Date: Sat, 12 May 2018 15:07:26 +0300 Subject: [PATCH] change logic of preloaders on init load --- web/app/components/root/root.jsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/web/app/components/root/root.jsx b/web/app/components/root/root.jsx index ebc9fa7b..c8b37e2e 100644 --- a/web/app/components/root/root.jsx +++ b/web/app/components/root/root.jsx @@ -57,17 +57,12 @@ export default class Root extends Component { .then(data => store.set('user', data)) .catch(() => store.set('user', {})) .finally(() => { - this.setState({ - isLoaded: true, - isCommentsListLoading: true, - }); - api.find({ sort, url }) .then(({ comments = [] } = {}) => store.set('comments', comments)) .catch(() => store.set('comments', [])) .finally(() => { this.setState({ - isCommentsListLoading: false, + isLoaded: true, user: store.get('user'), });