From 818b10a32d8a556330f94086884c43537cc7af48 Mon Sep 17 00:00:00 2001 From: Bilal Dieumegard Date: Wed, 4 Dec 2024 15:04:39 +0100 Subject: [PATCH] Ajout de la pagination coter client --- src/lib/components/ui/ChatItem.svelte | 6 +- .../api/channels/[id]/messages/+server.ts | 130 ++++++++++-------- src/routes/chats/+page.svelte | 2 +- src/routes/chats/[id]/+page.server.ts | 2 +- src/routes/chats/[id]/+page.svelte | 69 +++++++++- 5 files changed, 144 insertions(+), 65 deletions(-) diff --git a/src/lib/components/ui/ChatItem.svelte b/src/lib/components/ui/ChatItem.svelte index 52c763b..52c005b 100644 --- a/src/lib/components/ui/ChatItem.svelte +++ b/src/lib/components/ui/ChatItem.svelte @@ -1,8 +1,10 @@ @@ -10,7 +12,7 @@

{title}

{lastMessage}

-

{time}

+

{formatDistanceToNow(createdAt)}