mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 04:39:06 +00:00
www: use websocket status ended for redirecting
This commit is contained in:
@@ -177,6 +177,16 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
|
|||||||
case "FINAL_LONG_SUMMARY":
|
case "FINAL_LONG_SUMMARY":
|
||||||
if (message.data) {
|
if (message.data) {
|
||||||
setFinalSummary(message.data);
|
setFinalSummary(message.data);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "FINAL_TITLE":
|
||||||
|
console.debug("FINAL_TITLE event:", message.data);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "STATUS":
|
||||||
|
console.log("STATUS event:", message.data);
|
||||||
|
if (message.data.value === "ended") {
|
||||||
const newUrl = "/transcripts/" + transcriptId;
|
const newUrl = "/transcripts/" + transcriptId;
|
||||||
router.push(newUrl);
|
router.push(newUrl);
|
||||||
console.debug(
|
console.debug(
|
||||||
@@ -186,13 +196,6 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
|
|||||||
newUrl,
|
newUrl,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
|
|
||||||
case "FINAL_TITLE":
|
|
||||||
console.debug("FINAL_TITLE event:", message.data);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "STATUS":
|
|
||||||
setStatus(message.data);
|
setStatus(message.data);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user