mirror of
https://github.com/docmost/docmost.git
synced 2025-11-21 11:11:08 +10:00
refactor page editor
This commit is contained in:
@ -4,7 +4,7 @@ import classes from './comment.module.css';
|
||||
import { useAtomValue } from 'jotai';
|
||||
import { timeAgo } from '@/lib/time';
|
||||
import CommentEditor from '@/features/comment/components/comment-editor';
|
||||
import { editorAtom } from '@/features/editor/atoms/editorAtom';
|
||||
import { editorAtoms } from '@/features/editor/atoms/editor-atoms';
|
||||
import CommentActions from '@/features/comment/components/comment-actions';
|
||||
import CommentMenu from '@/features/comment/components/comment-menu';
|
||||
import { useHover } from '@mantine/hooks';
|
||||
@ -22,7 +22,7 @@ function CommentListItem({ comment }: CommentListItemProps) {
|
||||
const [isEditing, setIsEditing] = useState(false);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
const editor = useAtomValue(editorAtom);
|
||||
const editor = useAtomValue(editorAtoms);
|
||||
const [content, setContent] = useState(comment.content);
|
||||
const updateCommentMutation = useUpdateCommentMutation();
|
||||
const deleteCommentMutation = useDeleteCommentMutation(comment.pageId);
|
||||
|
||||
Reference in New Issue
Block a user