Sửa lỗi người nhận được line xem được nội dung Tour nhưng không xem được bình luận
This commit is contained in:
@@ -18,7 +18,7 @@ interface CommentModalProps {
|
|||||||
isPublicView?: boolean; // New prop to indicate public view
|
isPublicView?: boolean; // New prop to indicate public view
|
||||||
}
|
}
|
||||||
|
|
||||||
export const CommentModal: React.FC<CommentModalProps> = ({ isOpen, onClose, locationId, locationName }) => {
|
export const CommentModal: React.FC<CommentModalProps> = ({ isOpen, onClose, locationId, locationName, onCommentAdded, isPublicView = false }) => {
|
||||||
const [comments, setComments] = useState<Comment[]>([]);
|
const [comments, setComments] = useState<Comment[]>([]);
|
||||||
const [newComment, setNewComment] = useState('');
|
const [newComment, setNewComment] = useState('');
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
|
|||||||
@@ -564,6 +564,7 @@ export const ItineraryTimeline = ({
|
|||||||
onClose={() => setIsCommentModalOpen(false)}
|
onClose={() => setIsCommentModalOpen(false)}
|
||||||
locationId={commentLocationId}
|
locationId={commentLocationId}
|
||||||
locationName={commentLocationName}
|
locationName={commentLocationName}
|
||||||
|
isPublicView={isPublicView}
|
||||||
onCommentAdded={() => handleCommentIncrement(commentLocationId)}
|
onCommentAdded={() => handleCommentIncrement(commentLocationId)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user