fix: fix guest instance not working

This commit is contained in:
Xyphyn committed 2023-08-03 10:40:12 -07:00
1 parent 7e7197a676
commit 4fb4d2b7b8
6 files changed
+78 -57

No files matched your search

@@ -0,0 +1,28 @@
<script lang="ts">
import Button from '$lib/components/input/Button.svelte'
import Avatar from '$lib/components/ui/Avatar.svelte'
import type { Community } from 'lemmy-js-client'
export let items: Community[]
export let expanded: boolean
</script>
{#each items.sort((a, b) => a.title.localeCompare(b.title)) as follow}
<Button
class="hover:bg-slate-200 {expanded ? '' : '!p-1.5'}"
color="tertiary"
alignment="left"
href="/c/{follow.name}@{new URL(follow.actor_id).hostname}"
>
<Avatar
url={follow.icon}
alt={follow.name}
title={follow.title}
width={20}
slot="icon"
/>
<span class:hidden={!expanded}>
{follow.title}
</span>
</Button>
{/each}