Skip to content

Commit

Permalink
App: Wrap modules route in ErrorBoundary
Browse files Browse the repository at this point in the history
  • Loading branch information
qgerome committed Mar 23, 2022
1 parent 15db83b commit 5b23d2f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import LoginPage from "../pages/LoginPage";
import { useAuthentication } from "../helpers/hooks";
import ForgotPasswordPage from "../pages/ForgotPasswordPage";
import SetPasswordPage from "../pages/SetPasswordPage";
import { ErrorBoundary } from "@openimis/fe-core";

export const ROUTER_CONTRIBUTION_KEY = "core.Router";
export const APP_BOOT_CONTRIBUTION_KEY = "core.Boot";
Expand Down Expand Up @@ -109,9 +110,11 @@ const App = (props) => {
key={route.path}
path={"/" + route.path}
render={(props) => (
<RequireAuth {...props} {...others} redirectTo={"/login"}>
<route.component modulesManager={modulesManager} {...props} {...others} />
</RequireAuth>
<ErrorBoundary>
<RequireAuth {...props} {...others} redirectTo={"/login"}>
<route.component modulesManager={modulesManager} {...props} {...others} />
</RequireAuth>
</ErrorBoundary>
)}
/>
))}
Expand Down

0 comments on commit 5b23d2f

Please sign in to comment.