diff --git a/src/app/article/index.js b/src/app/article/index.js index 89b09a6b..90d47f79 100644 --- a/src/app/article/index.js +++ b/src/app/article/index.js @@ -29,17 +29,21 @@ function Article() { dispatch(articleActions.load(params.id)); dispatch(commentsActions.load(params.id)); }, [params.id]); - + useInit(async () => { + await store.actions.session.remind(); + }); const select = useSelector( state => ({ article: state.article.data, waiting: state.article.waiting, comments: state.comments.data, - waitingComments: state.comments.waiting + waitingComments: state.comments.waiting, + replyTo: state.comments.replyTo, + exists: state, }), shallowequal, ); // Нужно указать функцию для сравнения свойства объекта, так как хуком вернули объект - + console.log('exists',select.exists) const { t } = useTranslate(); const callbacks = { @@ -68,7 +72,19 @@ function Article() {
+ + Войдите + + , чтобы иметь возможность комментировать +
+ )} ); } diff --git a/src/store-redux/comments/actions.js b/src/store-redux/comments/actions.js index c2273059..e9cef2ed 100644 --- a/src/store-redux/comments/actions.js +++ b/src/store-redux/comments/actions.js @@ -1,5 +1,7 @@ import listToTree from '../../utils/list-to-tree'; import treeToList from '../../utils/tree-to-list'; +import axios from 'axios'; + export default { /** * Загрузка товара