-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: 주소 복사 알림창 크기 수정 * fix: 결제 금액 단위 표시 * fix:스크롤 맨 위로 이동, 이미지 첨부 후 버튼 활성화 * fix: 모달 데이터 스크롤바 추가, 불필요한 파일 삭제 * design: QR 스캔 버튼 위치 수정 * fix: QR 생성 버튼 한 계좌만 나오도록
- Loading branch information
Showing
17 changed files
with
217 additions
and
121 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { useEffect, useState } from 'react'; | ||
|
||
export const useTimer = (initialTime: number = 60 * 1000) => { | ||
const [time, setTime] = useState<number>(initialTime); | ||
const minute = String(Math.floor((time / (1000 * 60)) % 60)).padStart(2, '0'); | ||
const second = String(Math.floor((time / 1000) % 60)).padStart(2, '0'); | ||
|
||
const resetTimer = () => { | ||
setTime(initialTime); | ||
}; | ||
|
||
useEffect(() => { | ||
const timer = setInterval(() => { | ||
setTime((prevTime) => prevTime - 1000); | ||
}, 1000); | ||
|
||
if (time <= 0) { | ||
clearInterval(timer); | ||
} | ||
return () => clearInterval(timer); | ||
}, [time]); | ||
|
||
return [minute, second, resetTimer] as const; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.