@pubuduth-aplicy/chat-ui 2.2.5 → 2.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/components/Chat.tsx
CHANGED
|
@@ -17,7 +17,7 @@ export const Chat = () => {
|
|
|
17
17
|
const parsed = JSON.parse(event.data);
|
|
18
18
|
|
|
19
19
|
if (parsed.event === "newMessage") {
|
|
20
|
-
const message = parsed.data;
|
|
20
|
+
const message = parsed.data.data;
|
|
21
21
|
// Send delivery confirmation
|
|
22
22
|
// Update UI immediately
|
|
23
23
|
setMessages((prev) => [...prev, message]);
|
|
@@ -67,13 +67,13 @@ const Message = ({ message }: MessageProps) => {
|
|
|
67
67
|
|
|
68
68
|
const handleInProgress = () => {
|
|
69
69
|
console.log("Booking started (In Progress)");
|
|
70
|
-
window.location.href = `/booking/all`;
|
|
70
|
+
window.location.href = `/booking/all#${message.meta?.bookingDetails?.bookingId}`;
|
|
71
71
|
// Update booking status to InProgress
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
const handleComplete = () => {
|
|
75
75
|
console.log("Booking completed!");
|
|
76
|
-
window.location.href = `/booking/all`;
|
|
76
|
+
window.location.href = `/booking/all#${message.meta?.bookingDetails?.bookingId}`;
|
|
77
77
|
// Update booking status to Completed
|
|
78
78
|
};
|
|
79
79
|
|
|
@@ -83,7 +83,7 @@ const Message = ({ message }: MessageProps) => {
|
|
|
83
83
|
window.location.href = `/customer/customer-reviews`;
|
|
84
84
|
} else if (role === "provider") {
|
|
85
85
|
console.log("Navigate to review page for provider → customer");
|
|
86
|
-
window.location.href = `/booking/all`;
|
|
86
|
+
window.location.href = `/booking/all#${message.meta?.bookingDetails?.bookingId}`;
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
89
|
|