@@ -18,7 +18,6 @@ import { listen } from '@tauri-apps/api/event'
1818interface TimerItemProps {
1919 timer : Timer
2020 onRemove : ( id : string ) => void
21- onPause : ( id : string ) => void
2221}
2322
2423function formatTime ( ms : number ) : string {
@@ -32,7 +31,7 @@ function formatTime(ms: number): string {
3231 return `${ String ( m ) . padStart ( 2 , '0' ) } :${ String ( s ) . padStart ( 2 , '0' ) } `
3332}
3433
35- function TimerItem ( { timer, onRemove, onPause } : TimerItemProps ) {
34+ function TimerItem ( { timer, onRemove } : TimerItemProps ) {
3635 const tickTimer = useTimerStore ( ( s ) => s . tickTimer )
3736 const timeoutRef = useRef < ReturnType < typeof setTimeout > | null > ( null )
3837
@@ -75,11 +74,6 @@ function TimerItem({ timer, onRemove, onPause }: TimerItemProps) {
7574 < div className = "timer-header" >
7675 < span className = "timer-label" > { timer . label || 'Timer' } </ span >
7776 < div className = "timer-controls" >
78- { timer . status === 'running' && (
79- < button className = "timer-btn" onClick = { ( ) => onPause ( timer . id ) } title = "Pause" >
80- ⏸
81- </ button >
82- ) }
8377 < button
8478 className = "timer-btn timer-btn-remove"
8579 onClick = { ( ) => onRemove ( timer . id ) }
@@ -119,7 +113,6 @@ export function TimersPage({ onClose }: TimersPageProps) {
119113 const timers = useTimerStore ( ( s ) => s . timers )
120114 const addTimer = useTimerStore ( ( s ) => s . addTimer )
121115 const removeTimer = useTimerStore ( ( s ) => s . removeTimer )
122- const pauseTimer = useTimerStore ( ( s ) => s . pauseTimer )
123116 const completeTimer = useTimerStore ( ( s ) => s . completeTimer )
124117 const addToast = useAppStore ( ( s ) => s . addToast )
125118
@@ -284,9 +277,7 @@ export function TimersPage({ onClose }: TimersPageProps) {
284277 </ p >
285278 </ div >
286279 ) : (
287- timers . map ( ( t ) => (
288- < TimerItem key = { t . id } timer = { t } onRemove = { handleRemove } onPause = { pauseTimer } />
289- ) )
280+ timers . map ( ( t ) => < TimerItem key = { t . id } timer = { t } onRemove = { handleRemove } /> )
290281 ) }
291282 </ div >
292283 </ div >
0 commit comments