File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
apps/cowswap-frontend/src/common/containers/InvalidLocalTimeWarning Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1+ import { ReactNode } from 'react'
2+
13import { useLocalTimeOffset } from './localTimeOffsetState'
24
35import { GlobalWarning } from '../../pure/GlobalWarning'
@@ -7,12 +9,10 @@ const TIME_OFFSET_THRESHOLD = 60 // 60 seconds
79/**
810 * When the local device time is not valid ()
911 */
10- // TODO: Add proper return type annotation
11- // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
12- export function InvalidLocalTimeWarning ( ) {
12+ export function InvalidLocalTimeWarning ( ) : ReactNode | null {
1313 const localTimeOffset = useLocalTimeOffset ( )
1414
15- if ( ! localTimeOffset || localTimeOffset < TIME_OFFSET_THRESHOLD ) return null
15+ if ( ! localTimeOffset || Math . abs ( localTimeOffset ) < TIME_OFFSET_THRESHOLD ) return null
1616
1717 console . debug ( 'Local time offset:' , localTimeOffset )
1818
You can’t perform that action at this time.
0 commit comments