Skip to content

Commit

Permalink
docs: rename homepage client code snippet variables to be clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewWid committed Oct 27, 2024
1 parent 715daef commit d3e19c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/src/content/snippets/home-client.ts
Original file line number Diff line number Diff line change
@@ -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)
})

0 comments on commit d3e19c2

Please sign in to comment.