@cometchat/chat-uikit-react-native 4.3.18 → 4.3.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/android/.gradle/7.4/checksums/checksums.lock +0 -0
  2. package/android/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock +0 -0
  3. package/android/.gradle/7.4/dependencies-accessors/gc.properties +0 -0
  4. package/android/.gradle/7.4/executionHistory/executionHistory.lock +0 -0
  5. package/android/.gradle/7.4/fileChanges/last-build.bin +0 -0
  6. package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
  7. package/android/.gradle/7.4/gc.properties +0 -0
  8. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  9. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  10. package/android/.gradle/vcs-1/gc.properties +0 -0
  11. package/android/src/main/AndroidManifest.xml +6 -0
  12. package/ios/FileManager.m +2 -0
  13. package/package.json +1 -1
  14. package/src/CometChatConversations/CometChatConversations.tsx +31 -33
  15. package/src/CometChatGroups/CometChatGroups.tsx +2 -2
  16. package/src/CometChatGroups/GroupsConfiguration.ts +13 -16
  17. package/src/CometChatGroups/resources/index.ts +0 -3
  18. package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +14 -5
  19. package/src/CometChatMessageInformation/MessageInformationConfiguration.tsx +31 -12
  20. package/src/CometChatMessageInformation/index.ts +6 -3
  21. package/src/CometChatMessageList/CometChatMessageList.tsx +86 -13
  22. package/src/CometChatMessageList/MessageListConfiguration.ts +21 -0
  23. package/src/CometChatTabs/CometChatTabs.tsx +8 -8
  24. package/src/CometChatThreadedMessages/CometChatThreadedMessages.tsx +2 -1
  25. package/src/CometChatUsers/CometChatUsers.tsx +40 -11
  26. package/src/CometChatUsers/UsersConfiguration.tsx +2 -2
  27. package/src/CometChatUsers/UsersStyle.ts +101 -0
  28. package/src/CometChatUsers/index.ts +4 -1
  29. package/src/extensions/LinkPreview/LinkPreviewBubble.tsx +1 -1
  30. package/src/extensions/MessageTranslation/MessageTranslationBubble.tsx +1 -1
  31. package/src/extensions/MessageTranslation/MessageTranslationDecorator.tsx +1 -1
  32. package/src/extensions/SmartReplies/SmartRepliesDecorator.tsx +11 -6
  33. package/src/index.ts +8 -2
  34. package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +53 -53
  35. package/src/shared/framework/MessageDataSource.tsx +15 -11
  36. package/src/shared/libs/ImageZoom/ReactNativeZoomableView.tsx +1 -0
  37. package/src/shared/libs/ImageZoom/ReactNativeZoomableViewWithGestures.tsx +1 -1
  38. package/src/shared/libs/VideoPlayerControls/components/Control.tsx +1 -1
  39. package/src/shared/libs/VideoPlayerControls/components/PlayPause/PlayPause.tsx +1 -1
  40. package/src/shared/libs/luxon/src/impl/zoneUtil.js +0 -4
  41. package/src/shared/utils/CommonUtils.ts +17 -17
  42. package/src/shared/utils/DetailsUtils/DetailsUtils.tsx +1 -1
  43. package/src/shared/utils/InteractiveMessageUtils.ts +1 -1
  44. package/src/shared/views/CometChatActionSheet/ActionSheetStyle.ts +10 -12
  45. package/src/shared/views/CometChatAudioBubble/CometChatAudioBubble.tsx +1 -1
  46. package/src/shared/views/CometChatFileBubble/CometChatFileBubble.tsx +2 -2
  47. package/src/shared/views/CometChatFormBubble/CometChatFormBubble.tsx +1 -1
  48. package/src/shared/views/CometChatImageBubble/CometChatImageBubble.tsx +3 -3
  49. package/src/shared/views/CometChatImageBubble/assets/index.ts +1 -0
  50. package/src/shared/views/CometChatListItem/CometChatListItem.tsx +1 -1
  51. package/src/shared/views/CometChatMessageBubble/MessageBubbleStyle.ts +2 -2
  52. package/src/shared/views/CometChatReactionList/CometChatReactionList.tsx +0 -1
  53. package/src/shared/views/CometChatSchedulerBubble/CometChatSchedulerBubble.tsx +5 -5
  54. package/src/shared/views/CometChatVideoBubble/CometChatVideoBubble.tsx +1 -1
  55. package/src/CometChatGroups/resources/search.png +0 -0
@@ -61,6 +61,10 @@ function isDeletedMessage(message: CometChat.BaseMessage): boolean {
61
61
  return message.getDeletedBy() != null;
62
62
  }
63
63
 
64
+ function isMessageSent(message: CometChat.BaseMessage): boolean {
65
+ return message.getSentAt() ? true : false;
66
+ }
67
+
64
68
  export class MessageDataSource implements DataSource {
65
69
 
66
70
  getEditOption(): CometChatMessageOption {
@@ -139,7 +143,7 @@ export class MessageDataSource implements DataSource {
139
143
  let messageOptionList: CometChatMessageOption[] = [];
140
144
 
141
145
 
142
- if (isDeletedMessage(messageObject))
146
+ if (isDeletedMessage(messageObject) || !isMessageSent(messageObject))
143
147
  return messageOptionList;
144
148
 
145
149
 
@@ -174,52 +178,52 @@ export class MessageDataSource implements DataSource {
174
178
 
175
179
  getFormMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): CometChatMessageOption[] {
176
180
  let optionsList: Array<CometChatMessageOption> = [];
177
- if (!isDeletedMessage(messageObject))
181
+ if (!isDeletedMessage(messageObject) && isMessageSent(messageObject))
178
182
  optionsList.push(...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, group));
179
183
  return optionsList;
180
184
  }
181
185
 
182
186
  getSchedulerMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): CometChatMessageOption[] {
183
187
  let optionsList: Array<CometChatMessageOption> = [];
184
- if (!isDeletedMessage(messageObject))
188
+ if (!isDeletedMessage(messageObject) && isMessageSent(messageObject))
185
189
  optionsList.push(...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, group));
186
190
  return optionsList;
187
191
  }
188
192
 
189
193
  getCardMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): CometChatMessageOption[] {
190
194
  let optionsList: Array<CometChatMessageOption> = [];
191
- if (!isDeletedMessage(messageObject))
195
+ if (!isDeletedMessage(messageObject) && isMessageSent(messageObject))
192
196
  optionsList.push(...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, group));
193
197
  return optionsList;
194
198
  }
195
199
 
196
200
  getAudioMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): CometChatMessageOption[] {
197
201
  let optionsList: Array<CometChatMessageOption> = [];
198
- if (!isDeletedMessage(messageObject))
202
+ if (!isDeletedMessage(messageObject) && isMessageSent(messageObject))
199
203
  optionsList.push(...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, group));
200
204
  return optionsList;
201
205
  }
202
206
  getVideoMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): CometChatMessageOption[] {
203
207
  let optionsList: Array<CometChatMessageOption> = [];
204
- if (!isDeletedMessage(messageObject))
208
+ if (!isDeletedMessage(messageObject) && isMessageSent(messageObject))
205
209
  optionsList.push(...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, group));
206
210
  return optionsList
207
211
  }
208
212
  getImageMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): CometChatMessageOption[] {
209
213
  let optionsList: Array<CometChatMessageOption> = [];
210
- if (!isDeletedMessage(messageObject))
214
+ if (!isDeletedMessage(messageObject) && isMessageSent(messageObject))
211
215
  optionsList.push(...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, group));
212
216
  return optionsList;
213
217
  }
214
218
  getFileMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): CometChatMessageOption[] {
215
219
  let optionsList: Array<CometChatMessageOption> = [];
216
- if (!isDeletedMessage(messageObject))
220
+ if (!isDeletedMessage(messageObject) && isMessageSent(messageObject))
217
221
  optionsList.push(...ChatConfigurator.dataSource.getCommonOptions(loggedInUser, messageObject, group));
218
222
  return optionsList;
219
223
  }
220
224
  getMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): CometChatMessageOption[] {
221
225
  let optionsList: Array<CometChatMessageOption> = [];
222
- if (isDeletedMessage(messageObject))
226
+ if (isDeletedMessage(messageObject) || !isMessageSent(messageObject))
223
227
  return optionsList;
224
228
  if (messageObject.getCategory() == MessageCategoryConstants.message) {
225
229
  let type: string = messageObject.getType();
@@ -307,7 +311,7 @@ export class MessageDataSource implements DataSource {
307
311
  getCommonOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): CometChatMessageOption[] {
308
312
  let messageOptionList: CometChatMessageOption[] = [];
309
313
 
310
- if (isDeletedMessage(messageObject)) return messageOptionList;
314
+ if (isDeletedMessage(messageObject) || !isMessageSent(messageObject)) return messageOptionList;
311
315
 
312
316
  if (this.validateOption(loggedInUser, messageObject, MessageOptionConstants.replyInThread, group)) {
313
317
  messageOptionList.push(this.getReplyInThreadOption());
@@ -389,7 +393,7 @@ export class MessageDataSource implements DataSource {
389
393
  let loggedInUser = CometChatUIKit.loggedInUser;
390
394
  if(loggedInUser) {
391
395
  let mentionedUsers = message.getMentionedUsers();
392
- let textFormatters = [...(additionalParams?.textFormatters || [])] || [];
396
+ let textFormatters = [...(additionalParams?.textFormatters ?? [])];
393
397
 
394
398
  let linksTextFormatter = ChatConfigurator.getDataSource().getUrlsFormatter(loggedInUser);
395
399
  linksTextFormatter.setMessage(message);
@@ -556,6 +556,7 @@ class ReactNativeZoomableView extends Component<
556
556
  this._handleShifting(gestureState);
557
557
  }
558
558
  }
559
+ return false;
559
560
  };
560
561
 
561
562
  /**
@@ -134,7 +134,7 @@ class ReactNativeZoomableViewWithGestures extends React.Component<
134
134
  const { dx, dy } = gestureState;
135
135
 
136
136
  if (!swipeLengthThreshold) {
137
- return;
137
+ return null;
138
138
  }
139
139
 
140
140
  if (this._isValidHorizontalSwipe(gestureState)) {
@@ -5,7 +5,7 @@ import {styles} from './styles';
5
5
  interface ControlProps extends ViewProps {
6
6
  children: ReactNode;
7
7
  callback?: () => void;
8
- controlRef?: RefObject<TouchableHighlight>;
8
+ controlRef?: RefObject<any>;
9
9
  disabled?: boolean;
10
10
  style?: any;
11
11
  resetControlTimeout?: () => void;
@@ -5,7 +5,7 @@ import {NullControl} from '../NullControl';
5
5
  import type {VideoAnimations} from '../../types';
6
6
  import {styles} from './styles';
7
7
 
8
- export const playPauseRef = createRef<TouchableHighlight>();
8
+ export const playPauseRef = createRef<any>();
9
9
 
10
10
  interface PlayPauseProps {
11
11
  animations: VideoAnimations;
@@ -1,7 +1,3 @@
1
- /**
2
- * @private
3
- */
4
-
5
1
  import Zone from "../zone.js";
6
2
  import IANAZone from "../zones/IANAZone.js";
7
3
  import FixedOffsetZone from "../zones/fixedOffsetZone.js";
@@ -65,21 +65,21 @@ export class CommonUtils {
65
65
  static mergeArrays(arr1: Array<object>, arr2: Array<object>, key: string) {
66
66
  let map = new Map();
67
67
 
68
- arr1.forEach(obj => {
68
+ arr1.forEach((obj: any) => {
69
69
  if(!obj[key]) {
70
- map.set(Date.now(), obj);
70
+ map.set("" + Date.now() + Math.random(), obj);
71
71
  return;
72
72
  }
73
73
  map.set(obj[key], obj);
74
74
  });
75
75
 
76
- arr2.forEach(obj => {
76
+ arr2.forEach((obj: any) => {
77
77
  if (map.has(obj[key]) && obj[key]) {
78
78
  let mergedObj = this.mergeObjects(map.get(obj[key]), obj);
79
79
  map.set(obj[key], mergedObj);
80
80
  } else {
81
81
  if(!obj[key]) {
82
- map.set(Date.now(), obj);
82
+ map.set("" + Date.now() + Math.random(), obj);
83
83
  return;
84
84
  }
85
85
  map.set(obj[key], obj);
@@ -89,24 +89,24 @@ export class CommonUtils {
89
89
  return Array.from(map.values());
90
90
  }
91
91
 
92
- static getComponentIdFromMessage(message: CometChat.BaseMessage): Object {
93
- let id = {};
94
- if (message.receiver instanceof CometChat.User) {
95
- id['uid'] = (message.sender as CometChat.User).uid;
96
- } else if (message.receiver instanceof CometChat.Group) {
97
- id['guid'] = (message.receiver as CometChat.Group).guid;
92
+ static getComponentIdFromMessage(message : CometChat.BaseMessage):Object{
93
+ let id: anyObject = {};
94
+ if (message.getReceiver() instanceof CometChat.User) {
95
+ id['uid'] = (message.getSender() as any).uid;
96
+ } else if (message.getReceiver() instanceof CometChat.Group) {
97
+ id['guid'] = (message.getReceiver() as any).guid;
98
98
  }
99
- if (message.parentMessageId && message.parentMessageId !== 0) {
100
- id['parentMessageId'] = message.parentMessageId;
99
+ if (message.getParentMessageId() && message.getParentMessageId() !== 0) {
100
+ id['parentMessageId'] = message.getParentMessageId();
101
101
  }
102
102
  return id;
103
103
  }
104
104
 
105
- static checkIdBelongsToThisComponent(id, user: CometChat.User, group: CometChat.Group, parentMessageId: string | number): boolean {
106
- if (id) {
107
- if (id['parentMessageId'] && (id['parentMessageId'] != parentMessageId)) return false
108
- if ((id['uid'] || user) && id['uid'] != user?.uid) return false;
109
- if ((id['guid'] || group) && id['guid'] != group?.guid) return false;
105
+ static checkIdBelongsToThisComponent(id: anyObject, user :CometChat.User | any, group: CometChat.Group | any, parentMessageId :string| number): boolean{
106
+ if(id){
107
+ if(id['parentMessageId'] && ( id['parentMessageId'] != parentMessageId ))return false
108
+ if((id['uid'] || user) && id['uid'] != user?.uid) return false;
109
+ if( (id['guid'] || group) && id['guid'] != group?.guid) return false;
110
110
  }
111
111
  return true;
112
112
  }
@@ -387,7 +387,7 @@ const _allowedGroupDetailsOptions: { [key: string]: { [key: string]: boolean } }
387
387
  [GroupOptionConstants.bannedMembers]: true,
388
388
  [GroupOptionConstants.viewMembers]: true,
389
389
  [GroupOptionConstants.addMembers]: true,
390
- [GroupOptionConstants.delete]: false,
390
+ [GroupOptionConstants.delete]: true,
391
391
  },
392
392
  [GroupMemberScope.owner]: {
393
393
  [GroupOptionConstants.leave]: true,
@@ -24,7 +24,7 @@ export class InteractiveMessageUtils {
24
24
  let completed = false;
25
25
  let neededInteractionElement = interactionGoal?.getElementIds() || [];
26
26
  let neededInteractionElementCondition: string = interactionGoal?.getType() || "";
27
- let _interactedElements = [...interactedElements] || [];
27
+ let _interactedElements = [...(interactedElements ?? [])];
28
28
 
29
29
  switch (neededInteractionElementCondition) {
30
30
  case goalType.anyOf.toString():
@@ -20,15 +20,15 @@ export interface ActionSheetStylesInterface extends BaseStyleInterface {
20
20
  */
21
21
 
22
22
  export class ActionSheetStyles extends BaseStyle {
23
- layoutModeIconTint: string;
24
- titleFont: FontStyleInterface;
25
- titleColor: string;
26
- listItemIconTint: string;
27
- listItemTitleFont: FontStyleInterface;
28
- listItemTitleColor: string;
29
- listItemIconBackground: string;
30
- listItemIconBorderRadius: number;
31
- actionSheetSeparatorTint: string;
23
+ layoutModeIconTint?: string;
24
+ titleFont?: FontStyleInterface;
25
+ titleColor?: string;
26
+ listItemIconTint?: string;
27
+ listItemTitleFont?: FontStyleInterface;
28
+ listItemTitleColor?: string;
29
+ listItemIconBackground?: string;
30
+ listItemIconBorderRadius?: number;
31
+ actionSheetSeparatorTint?: string;
32
32
  paddingHorizontal?: number;
33
33
  optionsSeparatorTint?:string;
34
34
  /**
@@ -56,8 +56,6 @@ export class ActionSheetStyles extends BaseStyle {
56
56
  borderRadius: props.borderRadius,
57
57
  });
58
58
  if (props)
59
- for (const [key, value] of Object.entries(props)) {
60
- this[key] = value;
61
- }
59
+ Object.assign(this, props);
62
60
  }
63
61
  }
@@ -54,7 +54,7 @@ export const CometChatAudioBubble = ({
54
54
  const { theme } = useContext<CometChatContextType>(CometChatContext);
55
55
 
56
56
  const callCount = useRef(0);
57
- const timerId = useRef(null);
57
+ const timerId = useRef<any>(null);
58
58
  const threshold = 10;
59
59
  const timeframe = 1000;
60
60
 
@@ -42,7 +42,7 @@ export const CometChatFileBubble = ({
42
42
  const { theme } = useContext<CometChatContextType>(CometChatContext);
43
43
 
44
44
  const callCount = useRef(0);
45
- const timerId = useRef(null);
45
+ const timerId = useRef<any>(null);
46
46
  const threshold = 10;
47
47
  const timeframe = 1000;
48
48
 
@@ -118,7 +118,7 @@ export const CometChatFileBubble = ({
118
118
  };
119
119
 
120
120
 
121
- const wrapperPressTime = useRef(0);
121
+ const wrapperPressTime = useRef<any>(0);
122
122
  let viewProps = Platform.OS === "ios" ? {
123
123
  onTouchStart: () => {
124
124
  wrapperPressTime.current = Date.now();
@@ -433,7 +433,7 @@ export const CometChatFormBubble = memo((props: CometChatFormBubbleInterface) =>
433
433
  let completed = false;
434
434
  let neededInteractionElement = interactionGoal?.getElementIds() || [];
435
435
  let neededInteractionElementCondition: string = interactionGoal?.getType() || "";
436
- let _interactedElements = [...interactedElements] || [];
436
+ let _interactedElements = [...(interactedElements ?? [])];
437
437
 
438
438
  switch (neededInteractionElementCondition) {
439
439
  case goalType.anyOf.toString():
@@ -62,7 +62,7 @@ export const CometChatImageBubble = (props: CometChatImageBubbleInterface) => {
62
62
 
63
63
 
64
64
  const callCount = useRef(0);
65
- const timerId = useRef(null);
65
+ const timerId = useRef<any>(null);
66
66
  const threshold = 10;
67
67
  const timeframe = 1000;
68
68
 
@@ -232,13 +232,13 @@ export const CometChatImageBubble = (props: CometChatImageBubbleInterface) => {
232
232
  height,
233
233
  width,
234
234
  backgroundColor,
235
- }}
235
+ } as ImageStyle}
236
236
  />
237
237
  </View>
238
238
  :
239
239
  <Image
240
240
  resizeMode={resizeMode || "cover"}
241
- source={getImage(thumbnailUrl) || getImage(imageUrl)}
241
+ source={thumbnailUrl ? getImage(thumbnailUrl) : getImage(imageUrl!)}
242
242
  style={{
243
243
  height,
244
244
  width,
@@ -1,5 +1,6 @@
1
1
  //@ts-ignore
2
2
  import Spinner from './spineer.png';
3
+ //@ts-ignore
3
4
  import Default_image from './default_image.png'
4
5
 
5
6
  export const ICONS = {
@@ -109,7 +109,7 @@ export const CometChatListItem = (props: CometChatListItemInterface) => {
109
109
  let rowOptions = options();
110
110
  if (rowOptions) setSwipeRowOptions(rowOptions);
111
111
  }
112
- }, []);
112
+ }, [options]);
113
113
  /**
114
114
  * Component to be display the user status
115
115
  */
@@ -1,11 +1,11 @@
1
1
  import { BaseStyle, BaseStyleInterface, BorderStyle } from "../../base";
2
2
 
3
3
  export interface MessageBubbleStyleInterface extends BaseStyleInterface {
4
- alignSelf?: string;
4
+ alignSelf?: string | null;
5
5
  }
6
6
 
7
7
  export class MessageBubbleStyle extends BaseStyle {
8
- alignSelf?: string;
8
+ alignSelf?: string | null;
9
9
  constructor({
10
10
  backgroundColor = "rgba(20,20,20,0.4)",
11
11
  border = new BorderStyle({}),
@@ -147,7 +147,6 @@ export const CometChatReactionList = (props: CometChatReactionListInterface) =>
147
147
  return list;
148
148
  } catch (error: any) {
149
149
  console.log("error while fetching reactions", error)
150
- if (error?.code === "REQUEST_IN_PROGRESS") return;
151
150
  setState("error");
152
151
  return [];
153
152
  }
@@ -426,9 +426,9 @@ export const CometChatSchedulerBubble = memo(
426
426
  }
427
427
  };
428
428
 
429
- const getQuickSelectSlots = async (date, shouldViewNext = true) => {
429
+ const getQuickSelectSlots = async (date: Date, shouldViewNext = true) => {
430
430
  let day = DateTime.fromJSDate(date).toFormat("EEEE");
431
- date = DateTime.fromJSDate(date).toFormat(dateFormats.date);
431
+ let dateString = DateTime.fromJSDate(date).toFormat(dateFormats.date);
432
432
 
433
433
  let newQuickObj: anyObject = {};
434
434
  getConvertedAvailablityObjectForDate(date, day, newQuickObj);
@@ -445,15 +445,15 @@ export const CometChatSchedulerBubble = memo(
445
445
  });
446
446
 
447
447
  tempQuickSelectRange.current = range;
448
- if (range.length && newQuickObj[date]) {
449
- newQuickObj[date].availability = range;
448
+ if (range.length && newQuickObj[dateString]) {
449
+ newQuickObj[dateString].availability = range;
450
450
  }
451
451
  // Ensure range is an Array
452
452
  if (!Array.isArray(range)) {
453
453
  range = [];
454
454
  }
455
455
 
456
- if (range.length < 2 && shouldViewNext) await getNextQuickSlots(date, newQuickObj);
456
+ if (range.length < 2 && shouldViewNext) await getNextQuickSlots(dateString, newQuickObj);
457
457
 
458
458
  let quickSlotsArray: any[] = [];
459
459
 
@@ -77,7 +77,7 @@ export const CometChatVideoBubble = (props: CometChatVideoBubbleInterface) => {
77
77
  const [isVideoPlayerVisible, setIsVideoPlayerVisible] = useState(false);
78
78
 
79
79
  const callCount = useRef(0);
80
- const timerId = useRef(null);
80
+ const timerId = useRef<any>(null);
81
81
  const threshold = 10;
82
82
  const timeframe = 1000;
83
83