| 386 | const [newCommentText, setNewCommentText] = useState(""); |
| 387 | |
| 388 | const handleAddComment = (nodeId: string) => { |
| 389 | if (!newCommentText.trim()) return; |
| 390 | const comment = { |
| 391 | author: "you", |
| 392 | time: "just now", |
| 393 | text: newCommentText.trim() |
| 394 | }; |
| 395 | setPrComments(prev => ({ |
| 396 | ...prev, |
| 397 | [nodeId]: [...(prev[nodeId] || []), comment] |
| 398 | })); |
| 399 | setNewCommentText(""); |
| 400 | toast.success("Review note saved locally"); |
| 401 | }; |
| 402 | |
| 403 | // Publish and Export parameters |
| 404 | const { owner, repo } = useParams(); |