Skip to content

Commit 09b6799

Browse files
committed
fix: empty screen on messages page
1 parent 45bd18f commit 09b6799

File tree

1 file changed

+8
-0
lines changed
  • platforms/pictique/src/routes/(protected)/messages

1 file changed

+8
-0
lines changed

platforms/pictique/src/routes/(protected)/messages/+page.svelte

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import { onMount } from 'svelte';
55
import { apiClient } from '$lib/utils/axios';
66
import { heading } from '../../store';
7+
import Button from '$lib/ui/Button/Button.svelte';
78
89
let messages = $state([]);
910
@@ -26,6 +27,7 @@
2627
</script>
2728

2829
<section>
30+
{#if messages}
2931
{#each messages as message}
3032
<Message
3133
class="mb-6"
@@ -39,4 +41,10 @@
3941
}}
4042
/>
4143
{/each}
44+
{:else}
45+
<div class="h-[100vh] flex flex-col justify-center items-center gap-4">
46+
<h2 class="text-center">You have not started any conversations yet, find users and start a conversation with them.</h2>
47+
<Button class="w-[max-content]" variant="primary" size="sm" callback={async() => await goto('/discover')}>Search User</Button>
48+
</div>
49+
{/if}
4250
</section>

0 commit comments

Comments
 (0)