@vetc-miniapp/ui-react 0.0.8 → 0.0.10

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vetc-miniapp/ui-react",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "MiniApp Platform UI React",
5
5
  "main": "src/ui-react/index.js",
6
6
  "types": "src/ui-react/index.ts",
@@ -34,7 +34,7 @@ export function App({ config, children }) {
34
34
  initRouter(config);
35
35
 
36
36
  // 2. Lấy pathname từ URL WebView
37
- const rawPath = window.location.path || "/";
37
+ const rawPath = window.location.pathname || "/";
38
38
  const path = rawPath.replace("/miniapp", "") || "/";
39
39
  console.log(rawPath);
40
40
 
@@ -59,8 +59,10 @@ export function App({ config, children }) {
59
59
  if (!page || !page.Component) {
60
60
  console.warn("MiniApp: Page not found for current route");
61
61
  return (
62
- <div></div>
63
- );
62
+ <>
63
+ <div></div>
64
+ </>
65
+ );
64
66
  }
65
67
 
66
68
  const Component = page.Component || <div />;