Skip to content

Commit

Permalink
(fix) Fix core app routing to use getOpenmrsSpaBase() (#853)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibacher authored Dec 15, 2023
1 parent 907c2ef commit 7518b3e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions packages/apps/esm-login-app/src/root.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ export interface RootProps {}

const Root: React.FC<RootProps> = () => {
return (
<BrowserRouter basename={window.spaBase}>
<BrowserRouter basename={window.getOpenmrsSpaBase()}>
<Routes>
<Route path="/login" element={<Login />} />
<Route path="/login/confirm" element={<Login />} />
<Route path="/login/location" element={<LocationPicker />} />
<Route path="/logout" element={<RedirectLogout />} />
<Route path="login" element={<Login />} />
<Route path="login/confirm" element={<Login />} />
<Route path="login/location" element={<LocationPicker />} />
<Route path="logout" element={<RedirectLogout />} />
</Routes>
</BrowserRouter>
);
Expand Down
6 changes: 3 additions & 3 deletions packages/apps/esm-offline-tools-app/src/root.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import styles from './root.styles.scss';

const Root: React.FC = () => {
return (
<BrowserRouter basename={window.spaBase}>
<BrowserRouter basename={window.getOpenmrsSpaBase()}>
<DesktopSideNav />
<div className={classNames('omrs-main-content', styles.mainContentContainer)}>
<Routes>
<Route path="/offline-tools" element={<Home />} />
<Route path="/offline-tools/:page" element={<OfflineToolsPage />}>
<Route path="offline-tools" element={<Home />} />
<Route path="offline-tools/:page" element={<OfflineToolsPage />}>
<Route path=":patientUuid" element={<OfflineToolsPage />} />
</Route>
</Routes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export interface RootProps {}

const Root: React.FC<RootProps> = () => {
return (
<BrowserRouter basename={window.spaBase}>
<BrowserRouter basename={window.getOpenmrsSpaBase()}>
<Routes>
<Route path="/login/*" element={null} />
<Route path="/logout/*" element={null} />
<Route path="login/*" element={null} />
<Route path="logout/*" element={null} />
<Route
path="/*"
path="*"
element={
<div className={styles.primaryNavContainer}>
<Navbar />
Expand Down

0 comments on commit 7518b3e

Please sign in to comment.