@@ -2,7 +2,7 @@ import { faCircleCheck } from "@fortawesome/free-regular-svg-icons";
22import { faPause , faPlay , faStop } from "@fortawesome/free-solid-svg-icons" ;
33import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" ;
44import clsx from "clsx" ;
5- import { ForwardedRef , forwardRef , useEffect , useImperativeHandle , useState } from "react" ;
5+ import { Ref , useEffect , useImperativeHandle , useState } from "react" ;
66import { FormattedMessage , useIntl } from "react-intl" ;
77import { Tooltip } from "react-tooltip" ;
88import useSettings from "../../hooks/useSettings" ;
@@ -29,6 +29,7 @@ export type TimerActions = {
2929type PropTypes = {
3030 issue : TIssue ;
3131 data : IssueTimerData ;
32+ ref : Ref < TimerRef > ;
3233} & TimerActions ;
3334
3435export type TimerRef = {
@@ -39,7 +40,7 @@ export type TimerRef = {
3940 editTimer : ( ) => void ;
4041} ;
4142
42- const IssueTimer = forwardRef ( ( { issue, data : { active, time, start } , onStart, onPause, onReset, onOverrideTime, onDoneTimer } : PropTypes , ref : ForwardedRef < TimerRef > ) => {
43+ const IssueTimer = ( { issue, data : { active, time, start } , onStart, onPause, onReset, onOverrideTime, onDoneTimer, ref } : PropTypes ) => {
4344 const { formatMessage } = useIntl ( ) ;
4445 const { settings } = useSettings ( ) ;
4546
@@ -196,12 +197,10 @@ const IssueTimer = forwardRef(({ issue, data: { active, time, start }, onStart,
196197 ) }
197198 </ >
198199 ) ;
199- } ) ;
200+ } ;
200201
201202const calcTime = ( time : number , start ?: number ) => {
202203 return time + ( start ? new Date ( ) . getTime ( ) - start : 0 ) ;
203204} ;
204205
205- IssueTimer . displayName = "IssueTimer" ;
206-
207206export default IssueTimer ;
0 commit comments