diff --git a/frontend/src/components/CommentModal.tsx b/frontend/src/components/CommentModal.tsx index d1191d6..662c6ca 100644 --- a/frontend/src/components/CommentModal.tsx +++ b/frontend/src/components/CommentModal.tsx @@ -18,7 +18,7 @@ interface CommentModalProps { isPublicView?: boolean; // New prop to indicate public view } -export const CommentModal: React.FC = ({ isOpen, onClose, locationId, locationName }) => { +export const CommentModal: React.FC = ({ isOpen, onClose, locationId, locationName, onCommentAdded, isPublicView = false }) => { const [comments, setComments] = useState([]); const [newComment, setNewComment] = useState(''); const [isLoading, setIsLoading] = useState(false); diff --git a/frontend/src/components/ItineraryTimeline.tsx b/frontend/src/components/ItineraryTimeline.tsx index 94e44de..dd2b13c 100644 --- a/frontend/src/components/ItineraryTimeline.tsx +++ b/frontend/src/components/ItineraryTimeline.tsx @@ -564,6 +564,7 @@ export const ItineraryTimeline = ({ onClose={() => setIsCommentModalOpen(false)} locationId={commentLocationId} locationName={commentLocationName} + isPublicView={isPublicView} onCommentAdded={() => handleCommentIncrement(commentLocationId)} />