@momo-kits/foundation 0.89.1-rc.3 → 0.89.1-rc.5
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.
|
@@ -292,6 +292,7 @@ const HeaderToolkitAction: React.FC<any> = ({
|
|
|
292
292
|
preventBack,
|
|
293
293
|
}) => {
|
|
294
294
|
const {theme, navigator} = useContext(ApplicationContext);
|
|
295
|
+
const miniContext = useContext(MiniAppContext);
|
|
295
296
|
const [toolConfig, setToolConfig] = useState<any>();
|
|
296
297
|
const {onAction} = toolConfig ?? {};
|
|
297
298
|
|
|
@@ -301,10 +302,12 @@ const HeaderToolkitAction: React.FC<any> = ({
|
|
|
301
302
|
}
|
|
302
303
|
|
|
303
304
|
useEffect(() => {
|
|
304
|
-
if (
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
305
|
+
if (miniContext?.toolkitConfig?.hidden === false) {
|
|
306
|
+
if (navigator?.toolkitConfig) {
|
|
307
|
+
setToolConfig(navigator?.toolkitConfig);
|
|
308
|
+
} else {
|
|
309
|
+
getToolkitConfig();
|
|
310
|
+
}
|
|
308
311
|
}
|
|
309
312
|
}, []);
|
|
310
313
|
|
package/Application/types.ts
CHANGED