Skip to content

Commit

Permalink
🐛 초기화값 변경으로 인한 버그로 인해 패치내용 롤백
Browse files Browse the repository at this point in the history
  • Loading branch information
alittlekitten committed Jun 16, 2024
1 parent 1c0bcd3 commit 0c39cd9
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/hooks/utils/useTimeManage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { useState, useRef } from "react";

// 변수 초기화를 위해 전역에 Date 객체를 사용
const now = new Date(Date.now());

interface ITime {
ms: number;
second: number;
Expand All @@ -14,13 +11,13 @@ interface ITime {
}

const initState: ITime = {
ms: now.getMilliseconds(),
second: now.getSeconds(),
minute: now.getMinutes(),
hour: now.getHours(),
day: now.getDate(),
month: now.getMonth() + 1,
year: now.getFullYear(),
ms: 0,
second: 0,
minute: 0,
hour: 0,
day: 0,
month: 0,
year: 0,
};

const useTimeManage = () => {
Expand Down

0 comments on commit 0c39cd9

Please sign in to comment.