fixes issue with vote not updating
This commit is contained in:
@@ -60,6 +60,7 @@ export default function MobileVoting() {
|
|||||||
if (key == "track") {
|
if (key == "track") {
|
||||||
setYesHighlight(false);
|
setYesHighlight(false);
|
||||||
setNoHighlight(false);
|
setNoHighlight(false);
|
||||||
|
setVote(0.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(data);
|
console.log(data);
|
||||||
@@ -100,7 +101,7 @@ export default function MobileVoting() {
|
|||||||
}, [auth]);
|
}, [auth]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (sessionSocket?.readyState == WebSocket.OPEN) {
|
if (vote != 0.5 && sessionSocket?.readyState == WebSocket.OPEN) {
|
||||||
sessionSocket.send(
|
sessionSocket.send(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
action: "vote",
|
action: "vote",
|
||||||
|
|||||||
Reference in New Issue
Block a user