diff --git a/app/(dashboard)/projects/[projectId]/videos/[videoId]/page.tsx b/app/(dashboard)/projects/[projectId]/videos/[videoId]/page.tsx index d2330d1..74bfaff 100644 --- a/app/(dashboard)/projects/[projectId]/videos/[videoId]/page.tsx +++ b/app/(dashboard)/projects/[projectId]/videos/[videoId]/page.tsx @@ -583,7 +583,8 @@ export default function VideoPage() { }); if (res.ok) { - const newComment = await res.json(); + const response = await res.json(); + const newComment = response.data; // Replace temp comment with real one setVideo((prev) => { if (!prev) return prev; @@ -704,7 +705,8 @@ export default function VideoPage() { throw new Error('Failed to upload audio'); } - const { url } = await uploadRes.json(); + const uploadData = await uploadRes.json(); + const { url } = uploadData.data; // Submit comment with voice URL await handleAddComment({ url, duration: recordingTime }); @@ -947,7 +949,8 @@ export default function VideoPage() { }); if (res.ok) { - const newReply = await res.json(); + const response = await res.json(); + const newReply = response.data; // Replace temp reply with real one setVideo((prev) => { if (!prev) return prev; @@ -1073,7 +1076,8 @@ export default function VideoPage() { formData.append('audio', replyAudioBlob, 'recording.webm'); const uploadRes = await fetch('/api/upload/audio', { method: 'POST', body: formData }); if (!uploadRes.ok) throw new Error('Failed to upload audio'); - const { url } = await uploadRes.json(); + const uploadData = await uploadRes.json(); + const { url } = uploadData.data; await handleReplyComment(parentId, { url, duration: replyRecordingTime }); } catch (err) { console.error('Failed to submit voice reply:', err); @@ -1647,17 +1651,17 @@ export default function VideoPage() { )} >
-
- +
+ {authorName.charAt(0)} - {authorName} + {authorName} {comment.tag && ( {comment.tag.name} @@ -1665,7 +1669,7 @@ export default function VideoPage() { )}
-
+