mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-09-27 19:46:24 +00:00
feat: 增强评论功能,添加评论未更改提示,优化评论输入组件的占位符
This commit is contained in:
@ -33,6 +33,7 @@ export function CommentSection(
|
||||
const [currentUser, setCurrentUser] = useState<User | null>(null);
|
||||
const [comments, setComments] = useState<Comment[]>([]);
|
||||
const [refreshCommentsKey, setRefreshCommentsKey] = useState(0);
|
||||
const [activeInput, setActiveInput] = useState<{ id: number; type: 'reply' | 'edit' } | null>(null);
|
||||
|
||||
// 获取当前登录用户
|
||||
useEffect(() => {
|
||||
@ -98,6 +99,8 @@ export function CommentSection(
|
||||
comment={comment}
|
||||
parentComment={null}
|
||||
onCommentDelete={onCommentDelete}
|
||||
activeInput={activeInput}
|
||||
setActiveInputId={setActiveInput}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
|
Reference in New Issue
Block a user