diff --git a/src/components/comments-list/comments-list.tsx b/src/components/comments-list/comments-list.tsx index 89fad6e..660509f 100644 --- a/src/components/comments-list/comments-list.tsx +++ b/src/components/comments-list/comments-list.tsx @@ -13,8 +13,9 @@ const MAX_COUNT_COMMENTS = 10; function CommentsList ({offerId}: CommentsListProps) { const {fetchComments} = useActionCreators(commentsActions); const postCommentStatus = useAppSelector(commentsSelectors.statusPostRequest); - const comments = useAppSelector(commentsSelectors.sortedComments).slice(0, MAX_COUNT_COMMENTS); + const comments = useAppSelector(commentsSelectors.sortedComments); const commentsCount = comments.length; + const commentsPrepared = comments.slice(0, MAX_COUNT_COMMENTS); useEffect(() => { fetchComments(offerId); @@ -28,7 +29,7 @@ function CommentsList ({offerId}: CommentsListProps) { diff --git a/src/components/footer/footer.tsx b/src/components/footer/footer.tsx index 0e19eb4..16c88e5 100644 --- a/src/components/footer/footer.tsx +++ b/src/components/footer/footer.tsx @@ -2,7 +2,7 @@ import {Link} from 'react-router-dom'; import {AppRoute} from '../../const.ts'; import {memo} from 'react'; -function Footer() { +function Footer_() { return (