Skip to content

Commit

Permalink
chore(app): remove extra stuff from example
Browse files Browse the repository at this point in the history
  • Loading branch information
razshare committed Apr 20, 2024
1 parent 39b2f2d commit 510661f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
22 changes: 0 additions & 22 deletions src/routes/+page.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,8 @@ export function load({ url }) {
)
return previous
})
/**
* @type {import('svelte/store').Readable<null|import('./events/+server.js').Quote>}
*/
const quote2 = source(`/events?${searchParams}`, {
close({ connect }) {
console.log('reconnecting...')
connect()
},
})
.select('cat-quote')
.json(function or({ error, previous, raw }) {
console.log(
`Could not parse "${raw}" as json, reverting back to ${previous}. ${error}`,
)
return previous
})

const connection = source(`/events?${searchParams}`)
setTimeout(function after() {
connection.close()
}, 5000)

return {
quote,
quote2,
}
}
2 changes: 0 additions & 2 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import { enhance } from '$app/forms'
export let data
const quote = data?.quote
const quote2 = data?.quote2
</script>
<form use:enhance method="post">
Expand All @@ -12,4 +11,3 @@
<h3>An International Cat Quote</h3>
<span>{$quote?.value}</span><br />
<span>{$quote2?.value}</span><br />

0 comments on commit 510661f

Please sign in to comment.