From 37aecf69ff0d3595069630357560ee67a2863612 Mon Sep 17 00:00:00 2001 From: Nabil Ould Hamou Date: Wed, 4 Dec 2024 17:45:42 +0100 Subject: [PATCH] idk anymore --- src/lib/components/Message.svelte | 5 +---- src/lib/components/ui/ProfileCard.svelte | 17 ++++++----------- src/routes/+layout.server.ts | 16 +++++++++++----- src/routes/+page.server.ts | 7 +++++++ .../api/channels/[id]/messages/+server.ts | 2 +- src/routes/chats/+page.svelte | 12 ++---------- src/routes/chats/[id]/+page.svelte | 15 ++++++++++----- 7 files changed, 38 insertions(+), 36 deletions(-) diff --git a/src/lib/components/Message.svelte b/src/lib/components/Message.svelte index 7351fb7..14c3f15 100644 --- a/src/lib/components/Message.svelte +++ b/src/lib/components/Message.svelte @@ -6,9 +6,6 @@ export let messageContent: string; export let profilePicture: string | null; // Peut être null export let createdAt: string; // Date de création du message - - // Image par défaut si profilePicture est null - let defaultProfilePicture = "/images/default-profile.png"; @@ -16,7 +13,7 @@
Profile Picture diff --git a/src/lib/components/ui/ProfileCard.svelte b/src/lib/components/ui/ProfileCard.svelte index e4f3232..3ac987f 100644 --- a/src/lib/components/ui/ProfileCard.svelte +++ b/src/lib/components/ui/ProfileCard.svelte @@ -1,16 +1,12 @@
@@ -111,9 +116,9 @@
Chargement...
{/if} - {#if messages.length > 0} + {#if messages !== undefined && messages.length > 0} {#each messages as message} - + {/each} {:else}
Sélectionnez un message le chat est vide.