@momo-kits/foundation 0.92.1-tracking.14 → 0.92.1-tracking.16

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.
@@ -22,7 +22,6 @@ const NavigationContainer: React.FC<NavigationContainerProps> = ({
22
22
  options,
23
23
  maxApi,
24
24
  localization,
25
- initialParams,
26
25
  }) => {
27
26
  const context = useContext(MiniAppContext);
28
27
  const navigationRef = useRef<NavigationContainerRef>(null);
@@ -97,7 +96,7 @@ const NavigationContainer: React.FC<NavigationContainerProps> = ({
97
96
  <Stack.Screen
98
97
  name="Stack"
99
98
  component={StackScreen}
100
- initialParams={{screen, initialParams}}
99
+ initialParams={{screen}}
101
100
  options={{...getStackOptions(), ...options}}
102
101
  />
103
102
  <Stack.Screen
@@ -19,22 +19,16 @@ const StackScreen: React.FC<ScreenParams> = props => {
19
19
 
20
20
  const context = useContext(MiniAppContext);
21
21
 
22
- const {
23
- screen: Component,
24
- options,
25
- initialParams,
26
- }: ScreenParams = props.route.params;
22
+ const {screen: Component, options}: ScreenParams = props.route.params;
27
23
  const navigation = new Navigation(props.navigation, theme);
28
24
  const heightHeader = useHeaderHeight();
29
25
 
30
- const data = {
26
+ const params = {
31
27
  ...props.route.params,
32
- ...initialParams,
33
28
  navigation,
34
29
  };
35
30
 
36
- delete data.screen;
37
- delete data.initialParams;
31
+ delete params.screen;
38
32
 
39
33
  /**
40
34
  * set options for screen
@@ -130,7 +124,7 @@ const StackScreen: React.FC<ScreenParams> = props => {
130
124
  }}>
131
125
  <Component
132
126
  heightHeader={heightHeader}
133
- {...data}
127
+ {...params}
134
128
  onScreenLoad={() => {}}
135
129
  />
136
130
  {showGrid && <GridSystem />}
@@ -94,7 +94,6 @@ export type NavigationContainerProps = {
94
94
  options?: NavigationOptions;
95
95
  theme: Theme;
96
96
  maxApi: any;
97
- initialParams: Record<string, any>;
98
97
  localization?: LocalizationObject;
99
98
  };
100
99
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.92.1-tracking.14",
3
+ "version": "0.92.1-tracking.16",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {