Skip to content

Commit

Permalink
Merge pull request #711 from jembi/CU-86c0k74xv_Fix-issue-with-extern…
Browse files Browse the repository at this point in the history
…al-apps-not-doing-a-full-redirect

fx: now redirecting to correct urls for external apps
  • Loading branch information
drizzentic authored Nov 4, 2024
2 parents f34d7da + b61c537 commit d77492d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/header-app/src/components/openhim.appbar.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,10 @@ export default function OpenhimAppBar() {
index === pages.length - 1
? {
...page,
children: apps
.sort((a, b) => a.name.localeCompare(b.name))
.map(app => ({
name: app.name,
link: `#!/` + app.url.split('/').pop().split('.')[0]
}))
children: apps.sort((a, b) => a.name.localeCompare(b.name)).map(app => ({
name: app.name,
link: app.type === 'esmodule' ? `#!/` + app.url.split('/').pop().split('.')[0] : app.url
}))
}
: page
)
Expand Down
1 change: 1 addition & 0 deletions packages/header-app/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export interface UserProfile {
export interface App {
_id: string
name: string
type: 'esmodule' | 'external'
url: string
}

Expand Down

0 comments on commit d77492d

Please sign in to comment.