Skip to content

Commit

Permalink
[fix] use BrowserRouter in browser routing code (#1779)
Browse files Browse the repository at this point in the history
Co-authored-by: Durrab Khan <[email protected]>
  • Loading branch information
durrab and Durrab Khan authored Jan 8, 2021
1 parent e873427 commit c9ad8b9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SubAppDef, SubAppFeatureFactory } from "@xarc/subapp";
import { Router } from "react-router-dom";
import { BrowserRouter } from "react-router-dom";
import { createBrowserHistory } from "history";

import { ReactRouterFeatureOptions, _id, _subId } from "../common";
Expand Down Expand Up @@ -27,9 +27,9 @@ export function reactRouterFeature(options: ReactRouterFeatureOptions): SubAppFe
return {
Component: (props: any) => {
return (
<Router history={history}>
<BrowserRouter history={history}>
<Component {...props} />
</Router>
</BrowserRouter>
);
}
};
Expand Down

0 comments on commit c9ad8b9

Please sign in to comment.