diff options
| author | Kit La Touche <kit@transneptune.net> | 2024-11-21 16:26:10 -0500 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-11-22 18:07:41 -0500 |
| commit | 2f6adda366dc372609f214682ca866c104fc278e (patch) | |
| tree | 2a833b64866f87d889507116320b82b41c7fed13 /ui/routes | |
| parent | 9a2efe0545e1e695d45f8c7577c3899a6a648e53 (diff) | |
Use store.set where appropriate
If you're setting it to a static value, use set.
Diffstat (limited to 'ui/routes')
| -rw-r--r-- | ui/routes/(app)/+layout.svelte | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/routes/(app)/+layout.svelte b/ui/routes/(app)/+layout.svelte index cc900a6..e542f24 100644 --- a/ui/routes/(app)/+layout.svelte +++ b/ui/routes/(app)/+layout.svelte @@ -20,10 +20,10 @@ let channel = $derived($page.params.channel); function onBooted(boot) { - currentUser.update(() => ({ + currentUser.set({ id: boot.login.id, username: boot.login.name - })); + }); logins.update((value) => value.setLogins(boot.logins)); channelsList.update((value) => value.setChannels(boot.channels)); messages.update((value) => value.setMessages(boot.messages)); @@ -51,11 +51,11 @@ events = subscribeToEvents(response.data.resume_point); break; case 401: - currentUser.update(() => null); + currentUser.set(null); goto('/login'); break; case 503: - currentUser.update(() => null); + currentUser.set(null); goto('/setup'); break; default: |
