@@ -63,7 +63,7 @@ function CommentItem({ comment, level = 0 }: CommentItemProps) {
63
63
64
64
const isEditingThis = editingCommentId === comment . id ;
65
65
const isReplyingToThis = replyingToCommentId === comment . id ;
66
- const isOwner = user && comment . user . email === user . email ;
66
+ const isOwner = user && comment . profile . userId === user . id ;
67
67
68
68
const handleEdit = ( commentId : number ) => {
69
69
setEditingCommentId ( commentId ) ;
@@ -153,7 +153,7 @@ function CommentItem({ comment, level = 0 }: CommentItemProps) {
153
153
segmentId : segment . id ,
154
154
content : replyContent ,
155
155
parentId : rootParentId ,
156
- repliedToId : comment . user . id ,
156
+ repliedToId : comment . profile . userId ,
157
157
} ,
158
158
{
159
159
onSuccess : ( ) => {
@@ -200,7 +200,7 @@ function CommentItem({ comment, level = 0 }: CommentItemProps) {
200
200
< div className = "flex shrink-0 size-10 rounded-full overflow-hidden bg-gradient-to-br from-theme-100 to-theme-200 dark:from-theme-800 dark:to-theme-700 shadow-elevation-1 hover:shadow-elevation-2 transition-all duration-200" >
201
201
< img
202
202
className = "max-h-10 w-auto object-cover"
203
- src = { `https://api.dicebear.com/9.x/initials/svg?seed=${ comment . user . email } &backgroundColor=6366f1&textColor=ffffff` }
203
+ src = { `https://api.dicebear.com/9.x/initials/svg?seed=${ comment . profile . displayName } &backgroundColor=6366f1&textColor=ffffff` }
204
204
alt = "User avatar"
205
205
/>
206
206
</ div >
@@ -210,7 +210,7 @@ function CommentItem({ comment, level = 0 }: CommentItemProps) {
210
210
< div className = "flex items-start justify-between gap-2" >
211
211
< div className = "flex items-center gap-2 min-w-0 flex-wrap" >
212
212
< p className = "text-sm font-semibold text-foreground truncate" >
213
- { comment . user . email }
213
+ { comment . profile . displayName }
214
214
</ p >
215
215
216
216
{ /* Visual separator */ }
@@ -221,7 +221,7 @@ function CommentItem({ comment, level = 0 }: CommentItemProps) {
221
221
</ p >
222
222
223
223
{ /* Reply indicator */ }
224
- { comment . repliedTo && (
224
+ { comment . repliedToProfile && (
225
225
< >
226
226
< span className = "text-xs text-muted-foreground/60" >
227
227
•
@@ -231,7 +231,7 @@ function CommentItem({ comment, level = 0 }: CommentItemProps) {
231
231
< span className = "text-xs text-muted-foreground" >
232
232
replying to{ " " }
233
233
< span className = "font-medium text-theme-600 dark:text-theme-400 hover:text-theme-700 dark:hover:text-theme-300 transition-colors" >
234
- { comment . repliedTo . email }
234
+ { comment . repliedToProfile . displayName }
235
235
</ span >
236
236
</ span >
237
237
</ div >
@@ -350,7 +350,7 @@ function CommentItem({ comment, level = 0 }: CommentItemProps) {
350
350
< div className = "flex shrink-0 size-8 rounded-full overflow-hidden bg-gradient-to-br from-theme-100 to-theme-200 dark:from-theme-800 dark:to-theme-700 shadow-elevation-1" >
351
351
< img
352
352
className = "max-h-8 w-auto object-cover"
353
- src = { `https://api.dicebear.com/9.x/initials/svg?seed=${ user ?. email || "user" } &backgroundColor=6366f1&textColor=ffffff` }
353
+ src = { `https://api.dicebear.com/9.x/initials/svg?seed=${ user ?. id || "user" } &backgroundColor=6366f1&textColor=ffffff` }
354
354
alt = "Your avatar"
355
355
/>
356
356
</ div >
@@ -450,10 +450,8 @@ function CommentItem({ comment, level = 0 }: CommentItemProps) {
450
450
}
451
451
452
452
export function CommentList ( {
453
- showCommentForm,
454
453
onStartDiscussion,
455
454
} : {
456
- showCommentForm ?: boolean ;
457
455
onStartDiscussion ?: ( ) => void ;
458
456
} ) {
459
457
const { segment } = useLoaderData ( { from : "/learn/$slug/_layout/" } ) ;
0 commit comments