diff options
| author | Ben Beltran <ben@nsovocal.com> | 2020-03-22 11:53:13 -0600 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2020-03-22 11:53:13 -0600 |
| commit | 3841606684ee3d233266ad490905076a3562842c (patch) | |
| tree | 407adde62e5181cae2b0d3611bc6c18c00a20d67 /app/stores/forums.js | |
| parent | 00a6e8aa8dd06f8a2bd7ccccdccfcb6215cf4841 (diff) | |
Remove server
Diffstat (limited to 'app/stores/forums.js')
| -rw-r--r-- | app/stores/forums.js | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/app/stores/forums.js b/app/stores/forums.js index c473124..1928783 100644 --- a/app/stores/forums.js +++ b/app/stores/forums.js @@ -1,4 +1,5 @@ -import { writable } from 'svelte/store'; +import { readable } from 'svelte/store'; +import { onMessage } from '../socket_coordinator'; const internals = {}; @@ -70,17 +71,10 @@ internals.forums = [ } ]; -export const forums = writable(internals.forums); +export const forums = readable(internals.forums, (set) => { -export const addForum = function addForum() { + onMessage((message) => { - const id = Math.random(); - - forums.update((originalForums) => ([...originalForums, - { - id, - glyph: 'の', - label: `Woah ${id}` - } - ])); -}; + console.log(message, typeof message); + }); +}); |