File tree Expand file tree Collapse file tree 2 files changed +0
-4
lines changed
Expand file tree Collapse file tree 2 files changed +0
-4
lines changed Original file line number Diff line number Diff line change 11import { useState , useEffect , useRef } from 'react' ;
22
3- /* ---------------------- useTime --------------------- */
4-
53export default function useTime ( settings ) {
64 const { format } = settings || { } ;
75
Original file line number Diff line number Diff line change 11import { useState , useEffect , useRef } from 'react' ;
22
33
4- // Validate expiryTimestamp
54function isValidExpiryTimestamp ( expiryTimestamp ) {
65 const isValid = ( new Date ( expiryTimestamp ) ) . getTime ( ) > 0 ;
76 if ( ! isValid ) {
@@ -10,7 +9,6 @@ function isValidExpiryTimestamp(expiryTimestamp) {
109 return isValid ;
1110}
1211
13- // Validate onExpire
1412function isValidOnExpire ( onExpire ) {
1513 const isValid = onExpire && typeof onExpire === 'function' ;
1614 if ( onExpire && ! isValid ) {
You can’t perform that action at this time.
0 commit comments