flotilla/src/app/components/AppContainer.svelte

27 lines
647 B
Svelte
Raw Normal View History

<script lang="ts">
2025-02-04 00:37:14 +00:00
import type {Snippet} from "svelte"
import {page} from "$app/stores"
2024-10-15 22:52:30 +00:00
import {pubkey} from "@welshman/app"
import Landing from "@app/components/Landing.svelte"
import Toast from "@app/components/Toast.svelte"
import PrimaryNav from "@app/components/PrimaryNav.svelte"
2025-12-18 02:43:13 +00:00
import {modals} from "@app/util/modal"
2024-11-27 00:39:49 +00:00
2025-02-04 00:37:14 +00:00
interface Props {
children: Snippet
}
const {children}: Props = $props()
</script>
<div class="flex h-screen overflow-hidden">
2024-10-15 22:52:30 +00:00
{#if $pubkey}
<PrimaryNav>
2025-02-04 00:37:14 +00:00
{@render children?.()}
2024-10-15 22:52:30 +00:00
</PrimaryNav>
{:else if !$modals[$page.url.hash.slice(1)]}
2024-10-15 22:52:30 +00:00
<Landing />
{/if}
</div>
<Toast />