File tree Expand file tree Collapse file tree 8 files changed +6665
-3146
lines changed Expand file tree Collapse file tree 8 files changed +6665
-3146
lines changed Original file line number Diff line number Diff line change 99 "web" : " expo start --web"
1010 },
1111 "dependencies" : {
12- "@chatwoot/react-native-widget" : " ^0.0.19 " ,
12+ "@chatwoot/react-native-widget" : " ^0.0.20 " ,
1313 "@react-native-async-storage/async-storage" : " 1.23.1" ,
1414 "expo" : " ~51.0.28" ,
1515 "expo-status-bar" : " ~1.12.1" ,
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
55import { storeHelper , findColors } from './utils' ;
66import WebView from './WebView' ;
77import styles from './style' ;
8- import { COLOR_WHITE } from './constants' ;
8+ import { COLOR_WHITE } from './constants' ;
99
1010const propTypes = {
1111 isModalVisible : PropTypes . bool . isRequired ,
@@ -24,22 +24,14 @@ const propTypes = {
2424 closeModal : PropTypes . func ,
2525} ;
2626
27- const defaultProps = {
28- cwCookie : '' ,
29- user : { } ,
30- locale : 'en' ,
31- colorScheme : 'light' ,
32- customAttributes : { } ,
33- } ;
34-
3527const ChatWootWidget = ( {
3628 isModalVisible,
3729 baseUrl,
3830 websiteToken,
39- user,
40- locale,
41- colorScheme,
42- customAttributes,
31+ user = { } ,
32+ locale = 'en' ,
33+ colorScheme = 'light' ,
34+ customAttributes = { } ,
4335 closeModal,
4436} ) => {
4537 const [ cwCookie , setCookie ] = useState ( '' ) ;
@@ -82,7 +74,6 @@ const ChatWootWidget = ({
8274 ) ;
8375} ;
8476
85- ChatWootWidget . defaultProps = defaultProps ;
8677ChatWootWidget . propTypes = propTypes ;
8778
8879export default ChatWootWidget ;
Original file line number Diff line number Diff line change @@ -19,14 +19,6 @@ const propTypes = {
1919 closeModal : PropTypes . func ,
2020} ;
2121
22- const defaultProps = {
23- cwCookie : '' ,
24- user : { } ,
25- locale : 'en' ,
26- customAttributes : { } ,
27- colorScheme : 'light' ,
28- } ;
29-
3022const WebViewComponent = ( {
3123 baseUrl,
3224 websiteToken,
@@ -113,6 +105,6 @@ const styles = StyleSheet.create({
113105 flex : 1 ,
114106 } ,
115107} ) ;
116- WebViewComponent . defaultProps = defaultProps ;
108+
117109WebViewComponent . propTypes = propTypes ;
118110export default WebViewComponent ;
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 11{
22 "name" : " @chatwoot/react-native-widget" ,
3- "version" : " 0.0.19 " ,
3+ "version" : " 0.0.20 " ,
44 "description" : " React Native widget for Chatwoot" ,
55 "main" : " index.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
55import { storeHelper , findColors } from './utils' ;
66import WebView from './WebView' ;
77import styles from './style' ;
8- import { COLOR_WHITE } from './constants' ;
8+ import { COLOR_WHITE } from './constants' ;
99
1010const propTypes = {
1111 isModalVisible : PropTypes . bool . isRequired ,
@@ -24,22 +24,14 @@ const propTypes = {
2424 closeModal : PropTypes . func ,
2525} ;
2626
27- const defaultProps = {
28- cwCookie : '' ,
29- user : { } ,
30- locale : 'en' ,
31- colorScheme : 'light' ,
32- customAttributes : { } ,
33- } ;
34-
3527const ChatWootWidget = ( {
3628 isModalVisible,
3729 baseUrl,
3830 websiteToken,
39- user,
40- locale,
41- colorScheme,
42- customAttributes,
31+ user = { } ,
32+ locale = 'en' ,
33+ colorScheme = 'light' ,
34+ customAttributes = { } ,
4335 closeModal,
4436} ) => {
4537 const [ cwCookie , setCookie ] = useState ( '' ) ;
@@ -82,7 +74,6 @@ const ChatWootWidget = ({
8274 ) ;
8375} ;
8476
85- ChatWootWidget . defaultProps = defaultProps ;
8677ChatWootWidget . propTypes = propTypes ;
8778
8879export default ChatWootWidget ;
Original file line number Diff line number Diff line change @@ -19,22 +19,14 @@ const propTypes = {
1919 closeModal : PropTypes . func ,
2020} ;
2121
22- const defaultProps = {
23- cwCookie : '' ,
24- user : { } ,
25- locale : 'en' ,
26- customAttributes : { } ,
27- colorScheme : 'light' ,
28- } ;
29-
3022const WebViewComponent = ( {
3123 baseUrl,
3224 websiteToken,
33- cwCookie,
34- locale,
35- colorScheme,
36- user,
37- customAttributes,
25+ cwCookie = '' ,
26+ locale = 'en' ,
27+ colorScheme = 'light' ,
28+ user = { } ,
29+ customAttributes = { } ,
3830 closeModal,
3931} ) => {
4032 const [ currentUrl , setCurrentUrl ] = React . useState ( null ) ;
@@ -113,6 +105,5 @@ const styles = StyleSheet.create({
113105 flex : 1 ,
114106 } ,
115107} ) ;
116- WebViewComponent . defaultProps = defaultProps ;
117108WebViewComponent . propTypes = propTypes ;
118109export default WebViewComponent ;
You can’t perform that action at this time.
0 commit comments