Skip to content

Commit

Permalink
v4.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitninawe-cometchat committed Jun 4, 2024
1 parent 952f8f4 commit dba89aa
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cometchat/chat-uikit-react-native",
"version": "4.3.1",
"version": "4.3.2",
"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",
"main": "src/index",
"module": "src/index",
Expand Down
6 changes: 5 additions & 1 deletion src/shared/CometChatContext.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { createContext, useState } from 'react';
import React, { createContext, useEffect, useState } from 'react';
import { CometChatContextType } from './base/Types';
import { CometChatTheme } from './resources/CometChatTheme';
import { CometChatLocalize } from './resources/CometChatLocalize';
Expand Down Expand Up @@ -31,6 +31,10 @@ export const CometChatContextProvider = (props) => {
setTheme(theme);
}

useEffect(() => {
CometChatLocalize.init({})
}, [])

return (
<CometChatContext.Provider value={{theme, changeThemeMode, changeLocalise, applyTheme}}>
{children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class CometChatLocalize {
* Needs to be called at the start of the application in order to set the language
* @param {Object} - language & resources
*/
static init = ({ language, resources }) => {
static init = ({ language, resources } : { language?: string, resources?: Record<string, any> }) => {
if (language) {
this.locale = language;
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/views/CometChatDate/CometChatDate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const monthNames = [
const weekNames = [
'Sunday',
'Monday',
'Tuseday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
Expand Down

0 comments on commit dba89aa

Please sign in to comment.