aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-22 15:41:58 +0900
committernsfisis <nsfisis@gmail.com>2024-08-22 15:41:58 +0900
commit8172d4c463f3782ecf924e641e96f18b4308e6a7 (patch)
tree9566c2c3752f085b92481fc7ceb221b908a0748c
parent81dd1db4daa57e67b1f603c260afe6cb526e5278 (diff)
downloadiosdc-japan-2025-albatross-8172d4c463f3782ecf924e641e96f18b4308e6a7.tar.gz
iosdc-japan-2025-albatross-8172d4c463f3782ecf924e641e96f18b4308e6a7.tar.zst
iosdc-japan-2025-albatross-8172d4c463f3782ecf924e641e96f18b4308e6a7.zip
feat(frontend): log websocket message payload
-rw-r--r--frontend/app/components/GolfPlayApp.client.tsx1
-rw-r--r--frontend/app/components/GolfWatchApp.client.tsx1
2 files changed, 2 insertions, 0 deletions
diff --git a/frontend/app/components/GolfPlayApp.client.tsx b/frontend/app/components/GolfPlayApp.client.tsx
index 0230426..4bd464b 100644
--- a/frontend/app/components/GolfPlayApp.client.tsx
+++ b/frontend/app/components/GolfPlayApp.client.tsx
@@ -103,6 +103,7 @@ export default function GolfPlayApp({
} else if (readyState === ReadyState.OPEN) {
if (lastJsonMessage !== null) {
console.log(lastJsonMessage.type);
+ console.log(lastJsonMessage.data);
if (lastJsonMessage.type === "player:s2c:start") {
const { start_at } = lastJsonMessage.data;
gameStart(start_at);
diff --git a/frontend/app/components/GolfWatchApp.client.tsx b/frontend/app/components/GolfWatchApp.client.tsx
index c8b1d53..f02bfb9 100644
--- a/frontend/app/components/GolfWatchApp.client.tsx
+++ b/frontend/app/components/GolfWatchApp.client.tsx
@@ -90,6 +90,7 @@ export default function GolfWatchApp({ game, sockToken }: Props) {
} else if (readyState === ReadyState.OPEN) {
if (lastJsonMessage !== null) {
console.log(lastJsonMessage.type);
+ console.log(lastJsonMessage.data);
if (lastJsonMessage.type === "watcher:s2c:start") {
const { start_at } = lastJsonMessage.data;
gameStart(start_at);