Closed mentatbot[bot] closed 6 days ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
dev | ❌ Failed (Inspect) | Jun 30, 2024 7:04am | ||
docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 30, 2024 7:04am |
prod | ❌ Failed (Inspect) | Jun 30, 2024 7:04am |
This PR addresses issue #2693 by enabling live updates for comment likes using websockets. The following changes were made:
Backend Changes:
reaction.ts
to broadcast the updated comment when a like is added or removed.broadcastCommentUpdate
inserver.ts
to handle broadcasting comment updates.Frontend Changes:
use-api-subscription.ts
to include a newonCommentUpdate
callback for handling comment update messages.use-likes.ts
to subscribe to comment updates and update the likes count in real-time.These changes ensure that when a user likes a comment, the updated like count is broadcasted and reflected on all clients in real-time.
Closes #2693