From 9bd27d9708f01c1b4f54922a229eca5fe2915c2a Mon Sep 17 00:00:00 2001 From: Hirbod Mirjavadi Date: Tue, 21 Nov 2023 21:47:28 +0100 Subject: [PATCH 01/14] feat(wip): new channel message layout --- .../components/audio-player/audio-player.tsx | 2 +- .../components/message-item.tsx | 518 ++++++++++-------- .../components/creator-channels/messages.tsx | 31 +- .../app/components/creator-channels/types.ts | 1 + .../components/reaction/message-reactions.tsx | 13 +- 5 files changed, 321 insertions(+), 244 deletions(-) diff --git a/packages/app/components/audio-player/audio-player.tsx b/packages/app/components/audio-player/audio-player.tsx index 355322de14..c173fc6acc 100644 --- a/packages/app/components/audio-player/audio-player.tsx +++ b/packages/app/components/audio-player/audio-player.tsx @@ -123,7 +123,7 @@ export const AudioPlayer = memo( }, [id, prepare, url]); return ( - + diff --git a/packages/app/components/creator-channels/components/message-item.tsx b/packages/app/components/creator-channels/components/message-item.tsx index 7b87b66aee..aaa29252e1 100644 --- a/packages/app/components/creator-channels/components/message-item.tsx +++ b/packages/app/components/creator-channels/components/message-item.tsx @@ -91,6 +91,9 @@ export const MessageItem = memo( const animatedViewRef = useAnimatedRef(); const router = useRouter(); + const isByCreator = + channel_message?.sent_by?.profile.profile_id === channelOwnerProfileId; + const linkifiedMessage = useMemo( () => channel_message.body @@ -99,10 +102,12 @@ export const MessageItem = memo( cleanUserTextInput(removeTags(channel_message.body)), 10 ), - "!text-indigo-600 dark:!text-blue-400" + isByCreator + ? "text-base underline text-white" + : "text-underline text-base" ) : "", - [channel_message.body] + [channel_message.body, isByCreator] ); const style = useAnimatedStyle(() => { @@ -146,9 +151,6 @@ export const MessageItem = memo( return false; }, [channel_message.created_at]); - const isByCreator = - channel_message?.sent_by?.profile.profile_id === channelOwnerProfileId; - const loremText = useMemo( () => item.channel_message.body_text_length > 0 @@ -165,223 +167,68 @@ export const MessageItem = memo( return null; return ( - - - - - - - - - - - - - {channel_message?.sent_by?.profile.name ?? "Deleted User"} - - - - - - {formatDateRelativeWithIntl(channel_message.created_at)} - - {isByCreator ? ( - - - - ) : null} - - - - { - enableLayoutAnimations(true); - requestAnimationFrame(async () => { - await reactOnMessage.trigger({ - messageId: item.channel_message.id, - reactionId: id, - }); - requestAnimationFrame(() => { - enableLayoutAnimations(false); - }); - }); - }} + 0 ? 20 : 0, + }, + style, + ]} + tw="mt-1 px-3" + ref={animatedViewRef} + > + + + + + - - - - - - - {item.channel_message?.sent_by?.profile.profile_id === - user?.user?.data.profile.profile_id || isUserAdmin ? ( - { - Alert.alert( - "Are you sure you want to delete this message?", - "", - [ - { - text: "Cancel", - }, - { - text: "Delete", - style: "destructive", - onPress: () => { - enableLayoutAnimations(true); - requestAnimationFrame(async () => { - listRef.current?.prepareForLayoutAnimationRender(); - await deleteMessage.trigger({ - messageId: item.channel_message.id, - }); - requestAnimationFrame(() => { - enableLayoutAnimations(false); - }); - }); - }, - }, - ] - ); - }} - key="delete" - > - - - Delete - - - ) : null} - - { - // edit message only if message is not older than 2 hours and it belongs to the user - item.channel_message?.sent_by?.profile.profile_id === - user?.user?.data.profile.profile_id && - allowMessageEditing ? ( - { - runOnUI(() => { - "worklet"; - const values = measure(animatedViewRef); - if (values) { - editMessageItemDimension.value = { - height: values.height, - pageY: values.pageY, - }; - } - runOnJS(setEditMessage)({ - text: item.channel_message.body, - id: item.channel_message.id, - }); - })(); - }} - key="edit" - > - - - Edit - - - ) : null - } - {item.channel_message?.sent_by?.profile.profile_id !== - user?.user?.data.profile.profile_id ? ( - { - router.push( - { - pathname: - Platform.OS === "web" - ? router.pathname - : "/report", - query: { - ...router.query, - reportModal: true, - channelMessageId: item.channel_message.id, - }, - }, - Platform.OS === "web" ? router.asPath : undefined - ); - }} - key="report" - > - - - Report - - - ) : null} - - + - + + + + + + {item?.channel_message?.sent_by?.profile.name ?? "Deleted User"} + + + + + + {isByCreator && !permissions?.can_view_creator_messages ? ( {Platform.OS === "web" ? ( // INFO: I had to do it like that because blur-sm would crash for no reason even with web prefix - + {loremText} ) : item.channel_message.body_text_length > 0 ? ( <> - + {loremText} {item.channel_message.body_text_length > 0 ? ( - 0 + ? 45 * item.reaction_group.length + : undefined, + backgroundColor: isByCreator + ? "#0074FE" + : isDark + ? "#1F1F1F" + : "#ECECEC", + }} > - {linkifiedMessage} - {messageWasEdited && ( - - {` • edited`} - - )} - + + {linkifiedMessage} + {messageWasEdited && ( + + {` • edited`} + + )} + + ) : null} )} @@ -466,16 +348,182 @@ export const MessageItem = memo( isViewable={permissions?.can_view_creator_messages} /> ) : null} + + + { + enableLayoutAnimations(true); + requestAnimationFrame(async () => { + await reactOnMessage.trigger({ + messageId: item.channel_message.id, + reactionId: id, + }); + requestAnimationFrame(() => { + enableLayoutAnimations(false); + }); + }); + }} + /> + + + + + + + {item.channel_message?.sent_by?.profile.profile_id === + user?.user?.data.profile.profile_id || isUserAdmin ? ( + { + Alert.alert( + "Are you sure you want to delete this message?", + "", + [ + { + text: "Cancel", + }, + { + text: "Delete", + style: "destructive", + onPress: () => { + enableLayoutAnimations(true); + requestAnimationFrame(async () => { + listRef.current?.prepareForLayoutAnimationRender(); + await deleteMessage.trigger({ + messageId: item.channel_message.id, + }); + requestAnimationFrame(() => { + enableLayoutAnimations(false); + }); + }); + }, + }, + ] + ); + }} + key="delete" + > + + + Delete + + + ) : null} + + { + // edit message only if message is not older than 2 hours and it belongs to the user + item.channel_message?.sent_by?.profile.profile_id === + user?.user?.data.profile.profile_id && + allowMessageEditing ? ( + { + runOnUI(() => { + "worklet"; + const values = measure(animatedViewRef); + if (values) { + editMessageItemDimension.value = { + height: values.height, + pageY: values.pageY, + }; + } + runOnJS(setEditMessage)({ + text: item.channel_message.body, + id: item.channel_message.id, + }); + })(); + }} + key="edit" + > + + + Edit + + + ) : null + } + {item.channel_message?.sent_by?.profile.profile_id !== + user?.user?.data.profile.profile_id ? ( + { + router.push( + { + pathname: + Platform.OS === "web" + ? router.pathname + : "/report", + query: { + ...router.query, + reportModal: true, + channelMessageId: item.channel_message.id, + }, + }, + Platform.OS === "web" ? router.asPath : undefined + ); + }} + key="report" + > + + + Report + + + ) : null} + + + + {item.reaction_group.length > 0 ? ( - - - + <> + + + + ) : null} diff --git a/packages/app/components/creator-channels/messages.tsx b/packages/app/components/creator-channels/messages.tsx index 770ad2436a..489b674749 100644 --- a/packages/app/components/creator-channels/messages.tsx +++ b/packages/app/components/creator-channels/messages.tsx @@ -323,6 +323,35 @@ export const Messages = memo(() => { } }, [channelDetail.data?.owner, error, router, fresh]); + const transformedData = useMemo(() => { + return data.map((item, index, array) => { + let isSameSenderAsNext = false; + + if (index < array.length - 1) { + const currentSenderId = item.channel_message.sent_by.profile.profile_id; + const nextSenderId = + array[index + 1].channel_message.sent_by.profile.profile_id; + + const currentDate = new Date(item.channel_message.created_at).getTime(); + const nextDate = new Date( + array[index + 1].channel_message.created_at + ).getTime(); + const dayDifference = + Math.abs(currentDate - nextDate) / (1000 * 60 * 60 * 24); + + // Check for same sender as next and less than a day's difference + isSameSenderAsNext = + currentSenderId === nextSenderId && dayDifference < 1; + console.log( + `Item at index ${index}: Current Sender ID = ${currentSenderId}, Next Sender ID = ${nextSenderId}, isSameSenderAsNext = ${isSameSenderAsNext}` + ); + } + + // For the last item in the data (visually the first in the list), it's not same as the next + return { ...item, isSameSenderAsNext }; + }); + }, [data]); + const renderItem: ListRenderItem = useCallback( ({ item, extraData }) => { return ( @@ -562,7 +591,7 @@ export const Messages = memo(() => { ; diff --git a/packages/app/components/reaction/message-reactions.tsx b/packages/app/components/reaction/message-reactions.tsx index f74a12db38..64fef729a9 100644 --- a/packages/app/components/reaction/message-reactions.tsx +++ b/packages/app/components/reaction/message-reactions.tsx @@ -57,7 +57,7 @@ export const MessageReactions = ({ ); return ( - + {channelReactions ? channelReactions.map((item, index) => { const userReaction = reactionGroup.find( @@ -67,7 +67,6 @@ export const MessageReactions = ({ return ( handleReactionPress(item.id)} tw={[ - "min-h-[25px] items-center justify-center px-2", + "min-h-[20px] items-center justify-center px-2", userReaction.self_reacted - ? "rounded-lg bg-gray-100 dark:bg-gray-900" + ? "rounded-lg bg-gray-100 dark:bg-gray-700" : "", ]} > From d9686726b617877048303402908cc9a05289ea03 Mon Sep 17 00:00:00 2001 From: Hirbod Mirjavadi Date: Tue, 21 Nov 2023 23:41:56 +0100 Subject: [PATCH 02/14] Update AudioPlayer component styling --- packages/app/components/audio-player/audio-player.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/components/audio-player/audio-player.tsx b/packages/app/components/audio-player/audio-player.tsx index c173fc6acc..bd28aa474b 100644 --- a/packages/app/components/audio-player/audio-player.tsx +++ b/packages/app/components/audio-player/audio-player.tsx @@ -123,7 +123,7 @@ export const AudioPlayer = memo( }, [id, prepare, url]); return ( - + From 2deb66447d5e715600df87fafc816e4449bf8eaf Mon Sep 17 00:00:00 2001 From: Hirbod Mirjavadi Date: Tue, 21 Nov 2023 23:42:03 +0100 Subject: [PATCH 03/14] Fix consecutive message count bug in Messages component --- .../components/creator-channels/messages.tsx | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/packages/app/components/creator-channels/messages.tsx b/packages/app/components/creator-channels/messages.tsx index 489b674749..27c1a52c44 100644 --- a/packages/app/components/creator-channels/messages.tsx +++ b/packages/app/components/creator-channels/messages.tsx @@ -324,6 +324,8 @@ export const Messages = memo(() => { }, [channelDetail.data?.owner, error, router, fresh]); const transformedData = useMemo(() => { + let consecutiveCount = 0; // Initialize the consecutive message count + return data.map((item, index, array) => { let isSameSenderAsNext = false; @@ -339,24 +341,33 @@ export const Messages = memo(() => { const dayDifference = Math.abs(currentDate - nextDate) / (1000 * 60 * 60 * 24); - // Check for same sender as next and less than a day's difference + // Increment count or reset if sender changes + if (currentSenderId === nextSenderId) { + consecutiveCount++; + } else { + consecutiveCount = 0; // Reset count if sender changes + } + + // Check for same sender as next, less than a day's difference, and not the 5th message in a row isSameSenderAsNext = - currentSenderId === nextSenderId && dayDifference < 1; - console.log( - `Item at index ${index}: Current Sender ID = ${currentSenderId}, Next Sender ID = ${nextSenderId}, isSameSenderAsNext = ${isSameSenderAsNext}` - ); + currentSenderId === nextSenderId && + dayDifference < 1 && + consecutiveCount % 10 !== 0; + } else { + // For the last item in the list, always show the sender + isSameSenderAsNext = false; } - // For the last item in the data (visually the first in the list), it's not same as the next return { ...item, isSameSenderAsNext }; }); }, [data]); const renderItem: ListRenderItem = useCallback( - ({ item, extraData }) => { + ({ item, index, extraData }) => { return ( Date: Tue, 21 Nov 2023 23:42:07 +0100 Subject: [PATCH 04/14] Add animation to image preview component --- .../creator-channels/components/image-preview.web.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/app/components/creator-channels/components/image-preview.web.tsx b/packages/app/components/creator-channels/components/image-preview.web.tsx index 21696ec29b..e0d1cedb3c 100644 --- a/packages/app/components/creator-channels/components/image-preview.web.tsx +++ b/packages/app/components/creator-channels/components/image-preview.web.tsx @@ -65,6 +65,8 @@ export const ImagePreview = ({ }} transition={{ type: "timing" }} draggable={false} + animate={{ transform: "translate3d(0,0,0) scale(1)" }} + initial={{ transform: "translate3d(0,0,0) scale(1)" }} /> Date: Tue, 21 Nov 2023 23:42:12 +0100 Subject: [PATCH 05/14] Fix styling issues in MessageItem component --- .../components/message-item.tsx | 39 ++++++++++++------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/packages/app/components/creator-channels/components/message-item.tsx b/packages/app/components/creator-channels/components/message-item.tsx index aaa29252e1..2d02e3a1ae 100644 --- a/packages/app/components/creator-channels/components/message-item.tsx +++ b/packages/app/components/creator-channels/components/message-item.tsx @@ -61,6 +61,7 @@ const AnimatedView = Animated.createAnimatedComponent(View); export const MessageItem = memo( ({ item, + index, reactions, channelId, listRef, @@ -71,6 +72,7 @@ export const MessageItem = memo( isUserAdmin, channelOwnerProfileId, }: MessageItemProps & { + index: number; edition?: CreatorEditionResponse; isUserAdmin?: boolean; permissions?: ChannelById["permissions"]; @@ -103,8 +105,8 @@ export const MessageItem = memo( 10 ), isByCreator - ? "text-base underline text-white" - : "text-underline text-base" + ? "text-base underline text-white font-medium" + : "text-underline text-base font-medium" ) : "", [channel_message.body, isByCreator] @@ -170,16 +172,18 @@ export const MessageItem = memo( 0 ? 20 : 0, + backgroundColor: "red", }, style, ]} - tw="mt-1 px-3" + tw="group mb-1 flex-1 px-3" ref={animatedViewRef} > - - + 0 ? 25 : 0, + }} + > + {isByCreator && !permissions?.can_view_creator_messages ? ( {Platform.OS === "web" ? ( @@ -247,11 +256,11 @@ export const MessageItem = memo( <> {item.channel_message.body_text_length > 0 ? ( 0 - ? 45 * item.reaction_group.length + ? 48 * item.reaction_group.length : undefined, backgroundColor: isByCreator ? "#0074FE" @@ -321,6 +330,7 @@ export const MessageItem = memo( Platform.OS === "web" ? ( <> @@ -329,6 +339,7 @@ export const MessageItem = memo( {({ animatedRef, animatedStyles }) => ( @@ -512,11 +523,11 @@ export const MessageItem = memo( {item.reaction_group.length > 0 ? ( <> Date: Tue, 21 Nov 2023 23:42:17 +0100 Subject: [PATCH 06/14] Update emoji button dimensions --- packages/app/components/reaction/constants.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app/components/reaction/constants.ts b/packages/app/components/reaction/constants.ts index 7b622045b1..9605b4988a 100644 --- a/packages/app/components/reaction/constants.ts +++ b/packages/app/components/reaction/constants.ts @@ -1,5 +1,5 @@ -export const emojiButtonWidth = 54; -export const emojiButtonHeight = 37; +export const emojiButtonWidth = 50; +export const emojiButtonHeight = 36; export const reactionButtonSize = 18; export const reactionEmojis = ["😍", "🔥", "🤣", "🤯", "🙏"]; From 9ae640372d6434ed464262dfadd1b48c4a5e6a71 Mon Sep 17 00:00:00 2001 From: Hirbod Mirjavadi Date: Tue, 21 Nov 2023 23:42:23 +0100 Subject: [PATCH 07/14] Refactor message reactions component styles --- packages/app/components/reaction/message-reactions.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/app/components/reaction/message-reactions.tsx b/packages/app/components/reaction/message-reactions.tsx index 64fef729a9..b5224d6933 100644 --- a/packages/app/components/reaction/message-reactions.tsx +++ b/packages/app/components/reaction/message-reactions.tsx @@ -57,7 +57,7 @@ export const MessageReactions = ({ ); return ( - + {channelReactions ? channelReactions.map((item, index) => { const userReaction = reactionGroup.find( @@ -74,10 +74,10 @@ export const MessageReactions = ({ handleReactionPress(item.id)} tw={[ - "min-h-[20px] items-center justify-center px-2", + "min-h-[25px] items-center justify-center rounded-lg border-2 border-white px-1.5 dark:border-black", userReaction.self_reacted - ? "rounded-lg bg-gray-100 dark:bg-gray-700" - : "", + ? "bg-[#C4DFFF] dark:bg-[#102743]" + : "bg-[#F1F1F1] dark:bg-[#1C1C1C]", ]} > Date: Tue, 21 Nov 2023 23:42:28 +0100 Subject: [PATCH 08/14] Add useWindowDimensions hook to ReactionProvider --- .../components/reaction/reaction-provider.tsx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/packages/app/components/reaction/reaction-provider.tsx b/packages/app/components/reaction/reaction-provider.tsx index c1e5070286..f9e5149b10 100644 --- a/packages/app/components/reaction/reaction-provider.tsx +++ b/packages/app/components/reaction/reaction-provider.tsx @@ -1,4 +1,5 @@ import { useState, useMemo, useCallback } from "react"; +import { useWindowDimensions } from "react-native"; import Animated, { useSharedValue, @@ -19,6 +20,7 @@ export const ReactionProvider = ({ children }: any) => { const [position, setPosition] = useState({ top: 0, left: 0 }); const [reactions, setReactions] = useState(null); const animatedV = useSharedValue(0); + const { width } = useWindowDimensions(); const close = () => { setVisible(false); }; @@ -52,27 +54,21 @@ export const ReactionProvider = ({ children }: any) => { willChange: "transform", // make it hardware accelerated on web transform: [ { - translateX: totalRectButtonWidth / 2 - 5, + translateX: width < 768 ? -18 : totalRectButtonWidth - 30, }, { - translateY: -emojiButtonWidth / 2, + translateY: -emojiButtonWidth / 2 + 10, }, { scale: animatedV.value }, - { - translateX: -totalRectButtonWidth / 2 - 5, - }, - { - translateY: emojiButtonWidth / 2, - }, ], }; - }, [animatedV]); + }, [animatedV, width]); return ( {children} {visible && ( - + {reactions} From 335b02b3465e2ba7767136f2bd45e25a66cf31b8 Mon Sep 17 00:00:00 2001 From: Hirbod Mirjavadi Date: Tue, 21 Nov 2023 23:50:21 +0100 Subject: [PATCH 09/14] Fix key prop in MessageItem component --- .../app/components/creator-channels/components/message-item.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/components/creator-channels/components/message-item.tsx b/packages/app/components/creator-channels/components/message-item.tsx index 2d02e3a1ae..e0a5e6f61e 100644 --- a/packages/app/components/creator-channels/components/message-item.tsx +++ b/packages/app/components/creator-channels/components/message-item.tsx @@ -523,7 +523,7 @@ export const MessageItem = memo( {item.reaction_group.length > 0 ? ( <> From dd49c438979158f1c803d673ee7b87470e810d51 Mon Sep 17 00:00:00 2001 From: Hirbod Mirjavadi Date: Tue, 21 Nov 2023 23:54:19 +0100 Subject: [PATCH 10/14] Fix translation bug in ReactionProvider component --- packages/app/components/reaction/reaction-provider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/components/reaction/reaction-provider.tsx b/packages/app/components/reaction/reaction-provider.tsx index f9e5149b10..2da45f9c22 100644 --- a/packages/app/components/reaction/reaction-provider.tsx +++ b/packages/app/components/reaction/reaction-provider.tsx @@ -54,7 +54,7 @@ export const ReactionProvider = ({ children }: any) => { willChange: "transform", // make it hardware accelerated on web transform: [ { - translateX: width < 768 ? -18 : totalRectButtonWidth - 30, + translateX: width < 768 ? -18 : -totalRectButtonWidth / 2 + 60, }, { translateY: -emojiButtonWidth / 2 + 10, From 66edaee403dac743e5999cfd12dd28e5ac916b6d Mon Sep 17 00:00:00 2001 From: Hirbod Mirjavadi Date: Wed, 22 Nov 2023 00:19:47 +0100 Subject: [PATCH 11/14] Adjust styling and layout in MessageItem component --- .../components/message-item.tsx | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/packages/app/components/creator-channels/components/message-item.tsx b/packages/app/components/creator-channels/components/message-item.tsx index e0a5e6f61e..4db0c5a2e7 100644 --- a/packages/app/components/creator-channels/components/message-item.tsx +++ b/packages/app/components/creator-channels/components/message-item.tsx @@ -180,7 +180,7 @@ export const MessageItem = memo( ref={animatedViewRef} > {isByCreator && !permissions?.can_view_creator_messages ? ( - + 0 + ? 48 * item.reaction_group.length + : undefined, + backgroundColor: "#0074FE", + }} + > {Platform.OS === "web" ? ( // INFO: I had to do it like that because blur-sm would crash for no reason even with web prefix - - {loremText} - + {loremText} ) : item.channel_message.body_text_length > 0 ? ( - <> - + + {loremText} - + ) : null} ) : ( From c00e8d619aaef834330a800c11a60256e584bd2e Mon Sep 17 00:00:00 2001 From: Hirbod Mirjavadi Date: Wed, 22 Nov 2023 00:19:53 +0100 Subject: [PATCH 12/14] Fix null reference in Messages component --- packages/app/components/creator-channels/messages.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/app/components/creator-channels/messages.tsx b/packages/app/components/creator-channels/messages.tsx index 27c1a52c44..723f1a1249 100644 --- a/packages/app/components/creator-channels/messages.tsx +++ b/packages/app/components/creator-channels/messages.tsx @@ -330,13 +330,16 @@ export const Messages = memo(() => { let isSameSenderAsNext = false; if (index < array.length - 1) { - const currentSenderId = item.channel_message.sent_by.profile.profile_id; + const currentSenderId = + item?.channel_message?.sent_by?.profile?.profile_id; const nextSenderId = - array[index + 1].channel_message.sent_by.profile.profile_id; + array[index + 1]?.channel_message?.sent_by?.profile?.profile_id; - const currentDate = new Date(item.channel_message.created_at).getTime(); + const currentDate = new Date( + item.channel_message?.created_at + ).getTime(); const nextDate = new Date( - array[index + 1].channel_message.created_at + array[index + 1].channel_message?.created_at ).getTime(); const dayDifference = Math.abs(currentDate - nextDate) / (1000 * 60 * 60 * 24); From a8d50b7a467c9954a7a01669f6ccf59e6cd9d9ad Mon Sep 17 00:00:00 2001 From: Hirbod Mirjavadi Date: Wed, 22 Nov 2023 00:21:34 +0100 Subject: [PATCH 13/14] Add date display to message item --- .../components/creator-channels/components/message-item.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/app/components/creator-channels/components/message-item.tsx b/packages/app/components/creator-channels/components/message-item.tsx index 4db0c5a2e7..274bd5eeaa 100644 --- a/packages/app/components/creator-channels/components/message-item.tsx +++ b/packages/app/components/creator-channels/components/message-item.tsx @@ -217,6 +217,11 @@ export const MessageItem = memo( + + + {formatDateRelativeWithIntl(channel_message.created_at)} + + Date: Wed, 22 Nov 2023 00:28:42 +0100 Subject: [PATCH 14/14] Fix display issue in MessageItem component --- .../app/components/creator-channels/components/message-item.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/components/creator-channels/components/message-item.tsx b/packages/app/components/creator-channels/components/message-item.tsx index 274bd5eeaa..e40f3bf8e6 100644 --- a/packages/app/components/creator-channels/components/message-item.tsx +++ b/packages/app/components/creator-channels/components/message-item.tsx @@ -182,7 +182,7 @@ export const MessageItem = memo(