misc: Add empty search to community search
This commit is contained in:
1 parent
d42f8bc8af
commit
2f1257fffa
1 file changed
+16
-3
@@ -6,6 +6,7 @@
|
|||||||
ChatBubbleOvalLeftEllipsis,
|
ChatBubbleOvalLeftEllipsis,
|
||||||
Icon,
|
Icon,
|
||||||
PencilSquare,
|
PencilSquare,
|
||||||
|
QuestionMarkCircle,
|
||||||
UserGroup,
|
UserGroup,
|
||||||
} from 'svelte-hero-icons'
|
} from 'svelte-hero-icons'
|
||||||
import CommunityLink from '$lib/components/community/CommunityLink.svelte'
|
import CommunityLink from '$lib/components/community/CommunityLink.svelte'
|
||||||
@@ -60,6 +61,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ul class="flex flex-col">
|
<ul class="flex flex-col">
|
||||||
|
{#if data.communities.length == 0}
|
||||||
|
<div
|
||||||
|
class="text-slate-600 dark:text-zinc-400 flex flex-col justify-center items-center py-8"
|
||||||
|
>
|
||||||
|
<Icon src={QuestionMarkCircle} size="32" solid />
|
||||||
|
<h1 class="font-bold text-2xl">No communities</h1>
|
||||||
|
<p class="mt-2 text-center">
|
||||||
|
There are no communities with that name. Try refining your search.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
{#each data.communities as community}
|
{#each data.communities as community}
|
||||||
<li>
|
<li>
|
||||||
<div
|
<div
|
||||||
@@ -131,8 +143,8 @@
|
|||||||
</li>
|
</li>
|
||||||
{/each}
|
{/each}
|
||||||
</ul>
|
</ul>
|
||||||
|
{#if data.communities.length > 0}
|
||||||
<div class="mt-2 w-full">
|
<div class="mt-2 w-full">
|
||||||
<Button
|
<Button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$page.url.searchParams.set(
|
$page.url.searchParams.set(
|
||||||
@@ -147,4 +159,5 @@
|
|||||||
>
|
>
|
||||||
Next
|
Next
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
{/if}
|
||||||
Reference in new issue
Block a user