@@ -4,35 +4,33 @@ import {
4
4
clockDegreeAtom as CD ,
5
5
isClockPointerDownAtom as ICPD ,
6
6
isTimingNowAtom as ITN ,
7
- soundEffectAudioAtom as SEA ,
8
7
languageOptionValueAtom as LOV ,
9
8
progressUnitValueAtom as PUV ,
10
9
maxClockTimeAtom as MCT ,
11
10
} from "../../shared/atom" ;
12
- import { Container , TimeText } from "./Timer.styled" ;
13
- import { getPercentageFromDegree , getTimeFromDegree } from "./Timer.util" ;
11
+ import { Container } from "./Timer.styled" ;
14
12
import "firebase/messaging" ;
15
13
import RoundButton from "../Button/RoundButton/RoundButton" ;
16
14
import useMediaMatch from "../../hooks/useMediaMatch" ;
17
15
import { Theme } from "../../styles/theme" ;
18
16
import { IProps } from "./Timer.type" ;
19
17
import useRecordManager from "../../hooks/useRecordManager" ;
20
18
import TimerOption from "../TimerOption/TimerOption" ;
19
+ import TimeText from "../TimeText/TimeText" ;
21
20
22
21
let timerInterval : NodeJS . Timer | null = null ;
23
22
let startTime : Date | null = null ;
24
23
let startDegree : number = 0 ;
25
24
let isPausedBefore : boolean = false ;
26
25
27
26
export default function Timer ( { onTimingStart } : IProps ) {
28
- const [ isTimingNow , setIsTimingNow ] = useRecoilState ( ITN ) ;
29
- const [ clockDegree , setClockDegree ] = useRecoilState ( CD ) ;
30
27
const isClockPointerDown = useRecoilValue ( ICPD ) ;
31
28
const language = useRecoilValue ( LOV ) ;
32
- const progressUnit = useRecoilValue ( PUV ) ;
33
29
const maxClockTime = useRecoilValue ( MCT ) ;
34
- const [ isHideTimer , _ ] = useMediaMatch ( Theme . mediaQueries . hideTimerMaxWidth ) ;
30
+ const [ isTimingNow , setIsTimingNow ] = useRecoilState ( ITN ) ;
31
+ const [ clockDegree , setClockDegree ] = useRecoilState ( CD ) ;
35
32
const { manageBehavior, manageTimeRecords } = useRecordManager ( ) ;
33
+ const [ isHideTimer , _ ] = useMediaMatch ( Theme . mediaQueries . hideTimerMaxWidth ) ;
36
34
const isEmptyClockDegree = clockDegree >= 360 ;
37
35
38
36
const removeTimerInterval = ( ) => {
@@ -131,25 +129,7 @@ export default function Timer({ onTimingStart }: IProps) {
131
129
/>
132
130
< TimerOption />
133
131
</ div >
134
- < TimeText
135
- triggerZoom = { isClockPointerDown || isTimingNow }
136
- isHide = { isHideTimer }
137
- >
138
- < div className = "row" >
139
- < span className = "min" >
140
- { progressUnit === "time"
141
- ? getTimeFromDegree ( clockDegree , maxClockTime ) . min
142
- : getPercentageFromDegree ( clockDegree ) . int }
143
- </ span >
144
- </ div >
145
- < div className = "row" >
146
- < span className = "sec" >
147
- { progressUnit === "time"
148
- ? getTimeFromDegree ( clockDegree , maxClockTime ) . sec
149
- : "." + getPercentageFromDegree ( clockDegree ) . float }
150
- </ span >
151
- </ div >
152
- </ TimeText >
132
+ < TimeText />
153
133
</ Container >
154
134
) ;
155
135
}
0 commit comments