@momo-kits/foundation 0.92.1-tracking.5 → 0.92.1-tracking.7

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.
@@ -40,7 +40,6 @@ const StackScreen: React.FC<ScreenParams> = props => {
40
40
  * set options for screen
41
41
  */
42
42
  useLayoutEffect(() => {
43
- startTime.current = Date.now();
44
43
  InteractionManager.runAfterInteractions(() => {
45
44
  navigator?.maxApi?.showToastDebug?.({
46
45
  appId: context.appId,
@@ -119,15 +118,21 @@ const StackScreen: React.FC<ScreenParams> = props => {
119
118
  endTime.current = Date.now();
120
119
  clearTimeout(timeout.current);
121
120
  timeout.current = setTimeout(() => {
122
- timeLoad.current = endTime.current - startTime.current;
123
- navigator?.maxApi?.showToastDebug?.({
124
- appId: context.appId,
125
- message: `${Component.name} screen_load_time ${timeLoad.current}`,
126
- });
121
+ if (timeLoad.current === 0) {
122
+ timeLoad.current = endTime.current - startTime.current;
123
+ navigator?.maxApi?.showToastDebug?.({
124
+ appId: context.appId,
125
+ message: `${Component.name} screen_load_time ${timeLoad.current}`,
126
+ });
127
+ }
127
128
  }, 1000);
128
129
  },
129
130
  }}>
130
- <Component heightHeader={heightHeader} {...data} />
131
+ <Component
132
+ heightHeader={heightHeader}
133
+ {...data}
134
+ onScreenLoad={() => {}}
135
+ />
131
136
  {showGrid && <GridSystem />}
132
137
  </ScreenContext.Provider>
133
138
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.92.1-tracking.5",
3
+ "version": "0.92.1-tracking.7",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {