@trackunit/react-core-contexts 0.0.23 → 0.0.24
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/TrackunitRouter.d.ts +6 -0
- package/index.js +14 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2454,11 +2454,24 @@ const TrackunitDataProviders = ({
|
|
|
2454
2454
|
})
|
|
2455
2455
|
});
|
|
2456
2456
|
|
|
2457
|
+
const TrackunitRouter = ({
|
|
2458
|
+
children
|
|
2459
|
+
}) => {
|
|
2460
|
+
const {
|
|
2461
|
+
publicUrl
|
|
2462
|
+
} = useEnvironment();
|
|
2463
|
+
return jsx(BrowserRouter, Object.assign({
|
|
2464
|
+
basename: publicUrl
|
|
2465
|
+
}, {
|
|
2466
|
+
children: children
|
|
2467
|
+
}));
|
|
2468
|
+
};
|
|
2469
|
+
|
|
2457
2470
|
const TrackunitProviders = ({
|
|
2458
2471
|
children
|
|
2459
2472
|
}) => jsx(TrackunitDataProviders, {
|
|
2460
2473
|
children: jsx(ToastProviderApp, {
|
|
2461
|
-
children: jsx(
|
|
2474
|
+
children: jsx(TrackunitRouter, {
|
|
2462
2475
|
children: children
|
|
2463
2476
|
})
|
|
2464
2477
|
})
|