Add user state updates and bidding error handling in draft consumers
- Implement user state tracking and broadcasting on connect/disconnect and phase changes - Add bid start and place rejection handling with error messages to frontend and backend - Enhance movie serializer with TMDB integration and update relevant frontend components
This commit is contained in:
@@ -50,8 +50,16 @@ export const handleUserIdentifyMessages = (event, setUser) => {
|
||||
const { type, payload } = message;
|
||||
|
||||
if (type == DraftMessage.USER_IDENTIFICATION_INFORM) {
|
||||
console.log("Message: ", type, event.data);
|
||||
const { user } = payload;
|
||||
setUser(user);
|
||||
}
|
||||
};
|
||||
|
||||
export const handleUserStatusMessages = (event, setUserStatus) => {
|
||||
const message = JSON.parse(event.data);
|
||||
const { type, payload } = message;
|
||||
|
||||
if (type == DraftMessage.USER_STATE_INFORM) {
|
||||
setUserStatus(payload);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user