@vetc-miniapp/ui-react 0.0.5 → 0.0.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.
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import React, { useEffect, useState } from "react";
|
|
|
4
4
|
import { callHost } from "../bridge";
|
|
5
5
|
let routeMap = new Map()
|
|
6
6
|
let currentPath = "/"
|
|
7
|
+
console.log("SDK React object:", React);
|
|
7
8
|
|
|
8
9
|
export function initRouter(config) {
|
|
9
10
|
console.log(config);
|
|
@@ -61,7 +62,7 @@ export function App({ config, children }) {
|
|
|
61
62
|
// Tránh crash nếu chưa có page
|
|
62
63
|
if (!page || !page.Component) {
|
|
63
64
|
console.warn("MiniApp: Page not found for current route");
|
|
64
|
-
|
|
65
|
+
return <div />; // hoặc spinner
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
const Component = page.Component || <div />;
|