diff --git a/src/components/CommentCard.tsx b/src/components/CommentCard.tsx index f05fa22..70ad9cc 100644 --- a/src/components/CommentCard.tsx +++ b/src/components/CommentCard.tsx @@ -22,7 +22,7 @@ const CommentCard: Component<{ content: ReactiveComment; rootId: string }> = (pr ); const [now] = createDateNow(); const { locale, commentClassName } = configProvider; - const time = createMemo(() => getTimeAgo(props.content.insertedAt, now(), locale())); + const time = createMemo(() => getTimeAgo(new Date(props.content.time), now(), locale())); return (
diff --git a/src/controllers/commentListState.ts b/src/controllers/commentListState.ts index fbb8ed9..423e760 100644 --- a/src/controllers/commentListState.ts +++ b/src/controllers/commentListState.ts @@ -78,6 +78,7 @@ export interface ReactiveComment extends Exclude { level?: number; addr?: string; label?: string; + time: number; user_id?: string | number; status?: WalineCommentStatus; like: Accessor;