From d3e19c2e951bad01ae5417ce29c2563d7d27efd5 Mon Sep 17 00:00:00 2001 From: Matthew W Date: Mon, 28 Oct 2024 01:17:09 +1100 Subject: [PATCH] docs: rename homepage client code snippet variables to be clearer --- docs/src/content/snippets/home-client.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/content/snippets/home-client.ts b/docs/src/content/snippets/home-client.ts index 8ca553c..3c0543a 100644 --- a/docs/src/content/snippets/home-client.ts +++ b/docs/src/content/snippets/home-client.ts @@ -1,6 +1,6 @@ const es = new EventSource("/sse") -es.addEventListener("message", (event) => { - const data = JSON.parse(event.data) - console.log(data) +es.addEventListener("message", ({ data })) => { + const contents = JSON.parse(data) + console.log(contents) })