Skip to content

Commit

Permalink
Merge pull request #56 from ScilifelabDataCentre/iframe_page
Browse files Browse the repository at this point in the history
Work on adding KIARVA page in precision-medicine-portal
  • Loading branch information
SevLG authored Sep 10, 2024
2 parents 98e9dda + 25143d4 commit 92897f9
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions conf/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ server {
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
add_header Content-Security-Policy "default-src 'self';" always;
}
12 changes: 12 additions & 0 deletions pmp-frontend-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pmp-frontend-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-google-recaptcha": "^3.1.0",
"react-iframe": "^1.8.5",
"react-markdown": "^9.0.1",
"react-router-dom": "^6.22.3",
"remark-gfm": "^4.0.0"
Expand Down
5 changes: 5 additions & 0 deletions pmp-frontend-app/src/components/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import AboutFAQPage from '../pages/AboutFAQPage';
import AboutTeamPage from '../pages/AboutTeamPage';
import AboutPartnersPage from '../pages/AboutPartnersPage';
import AccessClinicalDataPage from '../pages/AccessClinicalDataPage'
import KiarvaIFramePage from '../pages/KiarvaIFramePage';

const router = createBrowserRouter([
{
Expand Down Expand Up @@ -73,6 +74,10 @@ const router = createBrowserRouter([
path: 'privacy',
element: <PrivacyPage />,
},
{
path: 'kiarva',
element: <KiarvaIFramePage />,
},
]
},
]);
Expand Down
21 changes: 21 additions & 0 deletions pmp-frontend-app/src/pages/KiarvaIFramePage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { ReactElement } from 'react';
import { TrackPageViewIfEnabled } from '../util/cookiesHandling';
import Iframe from 'react-iframe';

export default function KiarvaIFramePage(): ReactElement {
TrackPageViewIfEnabled();

let kiarva_hostname = '';

return (
<>
{kiarva_hostname &&
(<Iframe
url={kiarva_hostname}
width="100%"
height="1000"
allow='modals scripts' />)
}
</>
);
}

0 comments on commit 92897f9

Please sign in to comment.