Skip to content

Commit

Permalink
fix(client); fix time
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Dec 29, 2023
1 parent a5e55c1 commit 5e78092
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
14 changes: 2 additions & 12 deletions packages/api/src/typings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,9 @@ export interface BaseWalineResponseComment {
objectId: string;

/**
* Time ISOString when the comment is created
* Timestamp of the comment
*/
createdAt: string;

/**
* Time ISOString when the comment is inserted
*/
insertedAt: string;

/**
* Time ISOString when the comment is updated
*/
updatedAt: string;
time: number;

/**
* Content of comment
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/components/CommentCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ const link = computed(() => {
const like = computed(() => likes.value.includes(props.comment.objectId));
const time = computed(() =>
getTimeAgo(props.comment.insertedAt, now.value, locale.value),
getTimeAgo(new Date(props.comment.time), now.value, locale.value),
);
const isAdmin = computed(() => userInfo.value.type === 'administrator');
Expand Down

0 comments on commit 5e78092

Please sign in to comment.