From 1bbca87afb87586507431ccd5b62eb35d291ba71 Mon Sep 17 00:00:00 2001 From: t1enne Date: Sat, 2 Jul 2022 07:13:50 +0000 Subject: [PATCH] Prettified Code! --- .../chat/ChatContainer/ChatContainer.tsx | 14 ++++++++------ web/components/ui/ModIcon.tsx | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/web/components/chat/ChatContainer/ChatContainer.tsx b/web/components/chat/ChatContainer/ChatContainer.tsx index a3c9b9274..54699bfc1 100644 --- a/web/components/chat/ChatContainer/ChatContainer.tsx +++ b/web/components/chat/ChatContainer/ChatContainer.tsx @@ -30,7 +30,7 @@ export default function ChatContainer(props: Props) { return (
-
+
@@ -109,9 +109,11 @@ export default function ChatContainer(props: Props) { } function isSameUserAsLast(messages: ChatMessage[], index: number) { - const message = messages[index] - const { user: { id }} = message - const lastMessage = messages[index - 1] - - return id === lastMessage?.user.id + const message = messages[index]; + const { + user: { id }, + } = message; + const lastMessage = messages[index - 1]; + + return id === lastMessage?.user.id; } diff --git a/web/components/ui/ModIcon.tsx b/web/components/ui/ModIcon.tsx index f0b2ed012..2cacd2d3e 100644 --- a/web/components/ui/ModIcon.tsx +++ b/web/components/ui/ModIcon.tsx @@ -11,7 +11,7 @@ export default function ModIcon({ viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" > - This user has moderation rights + This user has moderation rights