@cometchat/chat-uikit-react-native 4.3.1 → 4.3.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cometchat/chat-uikit-react-native",
3
- "version": "4.3.1",
3
+ "version": "4.3.2",
4
4
  "description": "CometChat React Native UI Kit is a collection of custom UI Components designed to build text , chat and calling features in your application. The UI Kit is developed to keep developers in mind and aims to reduce development efforts significantly",
5
5
  "main": "src/index",
6
6
  "module": "src/index",
@@ -1,4 +1,4 @@
1
- import React, { createContext, useState } from 'react';
1
+ import React, { createContext, useEffect, useState } from 'react';
2
2
  import { CometChatContextType } from './base/Types';
3
3
  import { CometChatTheme } from './resources/CometChatTheme';
4
4
  import { CometChatLocalize } from './resources/CometChatLocalize';
@@ -31,6 +31,10 @@ export const CometChatContextProvider = (props) => {
31
31
  setTheme(theme);
32
32
  }
33
33
 
34
+ useEffect(() => {
35
+ CometChatLocalize.init({})
36
+ }, [])
37
+
34
38
  return (
35
39
  <CometChatContext.Provider value={{theme, changeThemeMode, changeLocalise, applyTheme}}>
36
40
  {children}
@@ -51,7 +51,7 @@ class CometChatLocalize {
51
51
  * Needs to be called at the start of the application in order to set the language
52
52
  * @param {Object} - language & resources
53
53
  */
54
- static init = ({ language, resources }) => {
54
+ static init = ({ language, resources } : { language?: string, resources?: Record<string, any> }) => {
55
55
  if (language) {
56
56
  this.locale = language;
57
57
  } else {
@@ -28,7 +28,7 @@ const monthNames = [
28
28
  const weekNames = [
29
29
  'Sunday',
30
30
  'Monday',
31
- 'Tuseday',
31
+ 'Tuesday',
32
32
  'Wednesday',
33
33
  'Thursday',
34
34
  'Friday',