@momo-kits/foundation 0.81.37-tracking.3 → 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.
@@ -272,7 +272,6 @@ const HeaderBackground: React.FC<HeaderBackgroundProps> = ({
272
272
  />
273
273
  {!!headerImage && (
274
274
  <Image
275
- key={headerImage}
276
275
  style={styles.headerBackground}
277
276
  source={{uri: headerImage}}
278
277
  loading={false}
@@ -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';
@@ -35,6 +35,18 @@ const NavigationContainer: React.FC<NavigationContainerProps> = ({
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.81.37-tracking.3",
3
+ "version": "0.81.37-tracking.4",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {