+ {select.exists ? (
+ <>
+
+ {isCommonPlace ? t('comment-form.new-comment') : t('comment-form.new-reply')}
+
+
+
+
+ {!isCommonPlace && (
+
+ >
+ ) : (
+
+
+ {t('comment.login-able-to-comment')}
+
+ )}
+
+ );
+}
+
+CommentForm.propTypes = {
+ children: PropTypes.node,
+};
+
+export default memo(CommentForm);
diff --git a/src/components/comment-form/style.css b/src/components/comment-form/style.css
new file mode 100644
index 000000000..0d2a8d2df
--- /dev/null
+++ b/src/components/comment-form/style.css
@@ -0,0 +1,29 @@
+.CommentForm {
+ display: flex;
+ flex-direction: column;
+ gap: 16px;
+}
+
+.CommentForm-buttons {
+ display: flex;
+ gap: 16px;
+}
+
+.CommentForm-textarea {
+ font-family: var(--font-family);
+ padding: 8px 12px;
+ color: var(--main-text);
+ &::placeholder {
+ color: var(--main-text);
+ }
+ &:focus {
+ outline: none;
+ }
+}
+
+.CommentForm-link-login {
+ padding: 0;
+ color: var(--primary);
+ font-family: var(--font-family);
+ font-weight: 400;
+}
\ No newline at end of file
diff --git a/src/components/comment-item/index.js b/src/components/comment-item/index.js
new file mode 100644
index 000000000..dceaea69b
--- /dev/null
+++ b/src/components/comment-item/index.js
@@ -0,0 +1,84 @@
+import { memo, useEffect, useRef, useState } from 'react';
+import { cn as bem } from '@bem-react/classname';
+import formatISODateToCustomString from '../../utils/format-iso-date';
+
+import './style.css';
+import CommentList from '../comment-list';
+import CommentForm from '../comment-form';
+import { useDispatch } from 'react-redux';
+import commentFormActions from '../../store-redux/comment-form/actions';
+import { useSelector as useSelectorRedux } from 'react-redux';
+import useSelector from '../../hooks/use-selector';
+import shallowequal from 'shallowequal';
+import useTranslate from '../../hooks/use-translate';
+
+function CommentItem({ item }) {
+ const cn = bem('CommentItem');
+ const dispatch = useDispatch();
+ const { t } = useTranslate();
+ const ref = useRef(null);
+ const [shouldScroll, setShouldScroll] = useState(false);
+
+ useEffect(() => {
+ if (shouldScroll) {
+ ref.current?.scrollIntoView({ behavior: 'smooth' });
+ setShouldScroll(false);
+ }
+ }, [shouldScroll]);
+
+ const select = useSelector(state => ({
+ user: state.session.user,
+ exists: state.session.exists,
+ }));
+
+ const selectCommentForm = useSelectorRedux(
+ state => ({
+ place: state.commentForm.place,
+ }),
+ shallowequal,
+ );
+
+ const scrollToTarget = () => {
+ setShouldScroll(true);
+ };
+
+ return (
+ <>
+