@momo-kits/foundation 0.81.37-tracking.2 → 0.81.37-tracking.4

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.
@@ -6,7 +6,7 @@ import {
6
6
  NavigationContainerRef,
7
7
  } from '@react-navigation/native';
8
8
  import {createStackNavigator} from '@react-navigation/stack';
9
- import {DeviceEventEmitter, NativeModules} from 'react-native';
9
+ import {Alert, DeviceEventEmitter, NativeModules} from 'react-native';
10
10
  import StackScreen from './StackScreen';
11
11
  import ModalScreen from './ModalScreen';
12
12
  import Navigator from './Navigator';
@@ -31,10 +31,22 @@ const NavigationContainer: React.FC<NavigationContainerProps> = ({
31
31
  const [language, setLanguage] = useState<'vi' | 'en'>('vi');
32
32
  const [config, setConfig] = useState<any>(undefined);
33
33
  let assets = theme.assets;
34
- if (config) {
34
+ if (config && theme.assets?.headerBackground) {
35
35
  assets = {...assets, headerBackground: config.navigationBar?.headerBar};
36
36
  }
37
37
 
38
+ if (maxApi) {
39
+ maxApi.elementTracking = (data: any) => {
40
+ Alert.alert(
41
+ 'Element Tracking',
42
+ JSON.stringify({...data, ...trackingInfo}),
43
+ );
44
+ };
45
+ maxApi.trackEvent = (event: string, params: any) => {
46
+ Alert.alert(`Navigation Tracking ${event}`, JSON.stringify(params));
47
+ };
48
+ }
49
+
38
50
  /**
39
51
  * handle mini language & listen change
40
52
  * engine only shake to enable grid view
package/Image/index.tsx CHANGED
@@ -55,6 +55,9 @@ const Image: React.FC<ImageProps> = ({
55
55
  onLoadStart={() => {
56
56
  error.current = false;
57
57
  }}
58
+ onLoad={() => {
59
+ error.current = false;
60
+ }}
58
61
  onLoadEnd={() => {
59
62
  let current: Status = 'success';
60
63
  if (error.current) {
package/Layout/Screen.tsx CHANGED
@@ -311,7 +311,6 @@ const Screen = forwardRef(
311
311
  uri: headerBackground,
312
312
  }}
313
313
  style={styles.extendedHeader}
314
- loading={false}
315
314
  />
316
315
  <View style={{height: heightHeader}} />
317
316
  </>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.81.37-tracking.2",
3
+ "version": "0.81.37-tracking.4",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {