From d0841e4db512012976a4b1bb7d9f421345edad73 Mon Sep 17 00:00:00 2001 From: IrohDW Date: Mon, 30 Dec 2024 14:39:02 -0700 Subject: [PATCH] Bugfixes Comment replies use full width available for username Fixed bug in PublishVideo.tsx that erased video durations when videos to publish are added twice --- src/components/Publish/PublishVideo/PublishVideo.tsx | 7 ++++++- src/components/common/FrameExtractor/FrameExtractor.tsx | 2 -- src/components/common/SuperLikesList/Comment.tsx | 4 +++- src/pages/Home/Home.tsx | 2 -- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/Publish/PublishVideo/PublishVideo.tsx b/src/components/Publish/PublishVideo/PublishVideo.tsx index 1cef539..1b2a529 100644 --- a/src/components/Publish/PublishVideo/PublishVideo.tsx +++ b/src/components/Publish/PublishVideo/PublishVideo.tsx @@ -147,7 +147,12 @@ export const PublishVideo = ({ const assembleVideoDurations = () => { if (files.length === videoDurations.value.length) return; const newArray: number[] = []; - files.map(() => newArray.push(0)); + + files.map((file, index) => + newArray.push( + videoDurations.value[index] ? videoDurations.value[index] : 0 + ) + ); videoDurations.value = [...newArray]; }; diff --git a/src/components/common/FrameExtractor/FrameExtractor.tsx b/src/components/common/FrameExtractor/FrameExtractor.tsx index 76fd0ab..a85e667 100644 --- a/src/components/common/FrameExtractor/FrameExtractor.tsx +++ b/src/components/common/FrameExtractor/FrameExtractor.tsx @@ -28,9 +28,7 @@ export const FrameExtractor = ({ const newVideoDurations = [...videoDurations.value]; newVideoDurations[index] = duration; - console.log("durations before update: ", videoDurations.value); videoDurations.value = [...newVideoDurations]; - console.log("durations after update: ", videoDurations.value); const section = duration / 4; const timestamps = []; diff --git a/src/components/common/SuperLikesList/Comment.tsx b/src/components/common/SuperLikesList/Comment.tsx index 4004248..1d9df62 100644 --- a/src/components/common/SuperLikesList/Comment.tsx +++ b/src/components/common/SuperLikesList/Comment.tsx @@ -259,7 +259,9 @@ export const CommentCard = ({ alt={`${name}'s avatar`} sx={{ width: "35px", height: "35px" }} /> - {name} + + {name} + { <> - { -