diff options
Diffstat (limited to 'ui/routes/(swatch)/.swatch/ConversationList')
| -rw-r--r-- | ui/routes/(swatch)/.swatch/ConversationList/+page.svelte | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/ui/routes/(swatch)/.swatch/ConversationList/+page.svelte b/ui/routes/(swatch)/.swatch/ConversationList/+page.svelte index ef0c8a9..b0bc97a 100644 --- a/ui/routes/(swatch)/.swatch/ConversationList/+page.svelte +++ b/ui/routes/(swatch)/.swatch/ConversationList/+page.svelte @@ -1,27 +1,23 @@ <script> - import { json } from '$lib/swatch/derive.js'; + import * as json from '$lib/swatch/json.js'; import ConversationList from '$lib/components/ConversationList.svelte'; let conversationsInput = $state( - JSON.stringify( - [ - { - id: 'Czero', - name: 'A long conversation', - hasUnreads: false, - }, - { - id: 'Cone', - name: 'A shorter conversation', - hasUnreads: true, - }, - ], - /* replacer */ null, - /* space */ 2, - ), + json.encode([ + { + id: 'Czero', + name: 'A long conversation', + hasUnreads: false, + }, + { + id: 'Cone', + name: 'A shorter conversation', + hasUnreads: true, + }, + ]), ); - let conversations = $derived(json(conversationsInput)); + let conversations = $derived(json.decode(conversationsInput)); let active = $state(null); </script> |
