MCPcopy Create free account
hub / github.com/R44VC0RP/opencode.cafe / handleDelete

Function handleDelete

components/comments/comment-card.tsx:62–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60 })
61
62 const handleDelete = async () => {
63 if (!confirm("Are you sure you want to delete this comment?")) return
64
65 setIsDeleting(true)
66 try {
67 if (isAdmin && !isOwner) {
68 await adminDeleteComment({ commentId: comment._id })
69 } else {
70 await removeComment({ commentId: comment._id })
71 }
72 } catch (err) {
73 console.error("Failed to delete comment:", err)
74 alert("Failed to delete comment")
75 } finally {
76 setIsDeleting(false)
77 }
78 }
79
80 const handleLike = async () => {
81 if (!isAuthenticated) return

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected