Skip to content

Commit

Permalink
[fix]최근 댓글 시간 표시 수정 #54
Browse files Browse the repository at this point in the history
  • Loading branch information
HyeongwooIM committed Jun 14, 2023
1 parent 42f1e79 commit a6a796a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
20 changes: 20 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"axios": "^1.4.0",
"env-cmd": "^10.1.0",
"moment": "^2.29.4",
"moment-timezone": "^0.5.43",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-quill": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default function Main() {
<SubjectIndex />
</div>
<div className={styles.width}>
{/* <RecentComment/> */}
<RecentComment/>
</div>
</div>
);
Expand Down
6 changes: 2 additions & 4 deletions src/hooks/ConvertTime.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import moment from "moment";
import { useEffect } from "react";

import moment from "moment-timezone";
interface Time {
title: string;
time: string;
}

export function ConvertTime(isoTime: Time) {
const now = moment();
const now = moment().subtract(9,"h");
const time = moment(isoTime.time);
let diffMinutes = now.diff(time, "minutes");

Expand Down

0 comments on commit a6a796a

Please sign in to comment.