fix: lỗi hiển thị ở frontend
This commit is contained in:
@@ -9,7 +9,7 @@ interface Comment {
|
||||
userName: string;
|
||||
content: string;
|
||||
createdAt: string;
|
||||
userId: string;
|
||||
userId?: string;
|
||||
}
|
||||
|
||||
interface CommentModalProps {
|
||||
@@ -81,7 +81,8 @@ export const CommentModal: React.FC<CommentModalProps> = ({ isOpen, onClose, loc
|
||||
id: newCommentData.id,
|
||||
userName: newCommentData.user?.name || 'Ẩn danh',
|
||||
content: newCommentData.content,
|
||||
createdAt: newCommentData.createdAt
|
||||
createdAt: newCommentData.createdAt,
|
||||
userId: newCommentData.userId || newCommentData.user?.id
|
||||
}];
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user