flotilla/src/app/components/AppContainer.svelte

27 lines
680 B
Svelte
Raw Normal View History

<script lang="ts">
2025-02-04 00:37:14 +00:00
import type {Snippet} from "svelte"
2024-10-15 22:52:30 +00:00
import {pubkey} from "@welshman/app"
2026-01-30 22:14:12 +00:00
import Dialog from "@lib/components/Dialog.svelte"
import Landing from "@app/components/Landing.svelte"
import Toast from "@app/components/Toast.svelte"
import PrimaryNav from "@app/components/PrimaryNav.svelte"
2026-03-11 23:29:24 +00:00
import {modal} 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>
2026-03-11 23:29:24 +00:00
{:else if !$modal}
2026-01-30 22:14:12 +00:00
<Dialog children={{component: Landing, props: {}}} />
2024-10-15 22:52:30 +00:00
{/if}
</div>
<Toast />