Add fallback nav items on mobile

This commit is contained in:
Jon Staab
2024-11-18 16:33:20 -08:00
parent 165bfb1b2b
commit 06a03f5ab1

View File

@@ -9,8 +9,8 @@
import ProfileFeed from "@app/components/ProfileFeed.svelte"
import RelayName from "@app/components/RelayName.svelte"
import RelayDescription from "@app/components/RelayDescription.svelte"
import {decodeRelay} from "@app/state"
import {makeChatPath} from "@app/routes"
import {decodeRelay, roomsByUrl} from "@app/state"
import {makeChatPath, makeRoomPath, makeSpacePath} from "@app/routes"
const url = decodeRelay($page.params.relay)
const relay = deriveRelay(url)
@@ -87,6 +87,17 @@
</div>
{/if}
</div>
<div class="grid grid-cols-3 gap-2 md:hidden">
<Link href={makeSpacePath(url, "threads")} class="bg-alt btn btn-neutral border-none">
<Icon icon="notes-minimalistic" /> Threads
</Link>
{#each $roomsByUrl.get(url) || [] as room (room)}
<Link href={makeRoomPath(url, room)} class="bg-alt btn btn-neutral border-none">
<Icon icon="hashtag" />
{room}
</Link>
{/each}
</div>
{#if pubkey}
<Divider>Recent posts from the relay admin</Divider>
<ProfileFeed {url} {pubkey} />