diff --git a/src/app/components/ChatMenu.svelte b/src/app/components/ChatMenu.svelte index 61aa76b1..17d8d301 100644 --- a/src/app/components/ChatMenu.svelte +++ b/src/app/components/ChatMenu.svelte @@ -1,6 +1,5 @@ + +
+ +
diff --git a/src/routes/chat/+layout.svelte b/src/routes/chat/+layout.svelte index 06244c98..de4e47b0 100644 --- a/src/routes/chat/+layout.svelte +++ b/src/routes/chat/+layout.svelte @@ -10,10 +10,12 @@ import Page from "@lib/components/Page.svelte" import Button from "@lib/components/Button.svelte" import Spinner from "@lib/components/Spinner.svelte" + import FAB from "@lib/components/FAB.svelte" import SecondaryNav from "@lib/components/SecondaryNav.svelte" import SecondaryNavHeader from "@lib/components/SecondaryNavHeader.svelte" import SecondaryNavSection from "@lib/components/SecondaryNavSection.svelte" import ChatMenu from "@app/components/ChatMenu.svelte" + import ChatStart from "@app/components/ChatStart.svelte" import ChatItem from "@app/components/ChatItem.svelte" import {chatSearch} from "@app/core/state" import {pushModal} from "@app/util/modal" @@ -26,18 +28,22 @@ const openMenu = () => pushModal(ChatMenu) + const startChat = () => pushModal(ChatStart) + let term = $state("") + let isClient = $state(false) const chats = $derived($chatSearch.searchOptions(term)) const promise = sleep(10000) onMount(() => { + isClient = true shouldUnwrap.set(true) }) - + Chats @@ -50,7 +56,7 @@ -
+
{#each chats as { id, pubkeys, messages } (id)} {/each} @@ -60,6 +66,11 @@
{/await}
+ {#if isClient} + + {/if}
{#key $page.url.pathname} diff --git a/src/routes/chat/+page.svelte b/src/routes/chat/+page.svelte index e0974e8a..bdfeb379 100644 --- a/src/routes/chat/+page.svelte +++ b/src/routes/chat/+page.svelte @@ -11,8 +11,15 @@ import ChatMenu from "@app/components/ChatMenu.svelte" import {chatSearch} from "@app/core/state" import {pushModal} from "@app/util/modal" + import FAB from "@lib/components/FAB.svelte" + import {onMount} from "svelte" let term = $state("") + let isClient = $state(false) + + onMount(() => { + isClient = true + }) const startChat = () => pushModal(ChatStart) @@ -64,6 +71,9 @@ {/each} + {#if isClient} + + {/if} {/snippet}