Context
The dashboard/request page currently relies on polling or reload; status changes (paid) should appear without manual refresh.
Acceptance criteria
- Subscribe to a request room via the Socket.IO client (
socket.emit('subscribe', { requestId })).
- On
request:paid / request:cancelled, update the local status immediately.
- Clean up the subscription on unmount.
Technical notes
- Reuse
socket.io-client (dependency present).
- Guard against reconnect storms (single subscription per mounted component).
Testing
- Test that a simulated socket event updates component state.
Context
The dashboard/request page currently relies on polling or reload; status changes (paid) should appear without manual refresh.
Acceptance criteria
socket.emit('subscribe', { requestId })).request:paid/request:cancelled, update the local status immediately.Technical notes
socket.io-client(dependency present).Testing