mirror of
https://github.com/coracle-social/flotilla.git
synced 2025-12-10 19:07:06 +00:00
Hide loader when no admin posts exist
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
export let url
|
||||
export let pubkey
|
||||
export let events: TrustedEvent[] = []
|
||||
|
||||
const ctrl = createFeedController({
|
||||
useWindowing: true,
|
||||
@@ -28,7 +29,6 @@
|
||||
|
||||
let element: Element
|
||||
let buffer: TrustedEvent[] = []
|
||||
let events: TrustedEvent[] = []
|
||||
|
||||
onMount(() => {
|
||||
const scroller = createScroller({
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import {page} from "$app/stores"
|
||||
import type {TrustedEvent} from "@welshman/util"
|
||||
import {deriveRelay} from "@welshman/app"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Link from "@lib/components/Link.svelte"
|
||||
@@ -32,6 +33,8 @@
|
||||
|
||||
const joinSpace = () => pushModal(SpaceJoin, {url})
|
||||
|
||||
let relayAdminEvents: TrustedEvent[] = []
|
||||
|
||||
$: pubkey = $relay?.profile?.pubkey
|
||||
</script>
|
||||
|
||||
@@ -143,8 +146,10 @@
|
||||
{/each}
|
||||
</div>
|
||||
{#if pubkey}
|
||||
<Divider>Recent posts from the relay admin</Divider>
|
||||
<ProfileFeed {url} {pubkey} />
|
||||
<div class="hidden flex-col gap-2" class:!flex={relayAdminEvents.length > 0}>
|
||||
<Divider>Recent posts from the relay admin</Divider>
|
||||
<ProfileFeed {url} {pubkey} bind:events={relayAdminEvents} />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user