Skip to content

Commit

Permalink
Merge pull request #112 from typhoidgenomics/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
lcerdeira authored Feb 15, 2024
2 parents 64d088f + 82251f7 commit 6ac8987
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions client/src/components/Elements/DownloadData/DownloadData.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,9 @@ export const DownloadData = () => {
graphImg.src = await domtoimage.toPng(document.getElementById(graphCards[index].id), { bgcolor: 'white' });
await graphImgPromise;
if (graphImg.width <= 741) {
doc.addImage(graphImg, 'PNG', 16, 110, undefined,'FAST');
doc.addImage(graphImg, 'PNG', 16, 110,undefined,undefined, undefined, 'FAST');
} else {
doc.addImage(graphImg, 'PNG', 16, 110, pageWidth - 80, 271, undefined,'FAST');
doc.addImage(graphImg, 'PNG', 16, 110, pageWidth - 80, 271, undefined, 'FAST');
}

doc.setFillColor(255, 255, 255);
Expand Down Expand Up @@ -468,7 +468,7 @@ export const DownloadData = () => {
startIcon={<PictureAsPdf />}
loadingPosition="start"
>
Download report from current view (PDF, 1MB)
Download report from current view (PDF, 2MB)
</LoadingButton>
<Snackbar open={showAlert} autoHideDuration={5000} onClose={handleCloseAlert}>
<Alert onClose={handleCloseAlert} severity="error" sx={{ width: '100%' }}>
Expand Down
2 changes: 1 addition & 1 deletion client/src/constants.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Static routes to run the app. Only use one: local or heroku.
//export const API_ENDPOINT = 'http://localhost:8080/api/';
export const API_ENDPOINT = 'https://typhinet.herokuapp.com/api/';
export const API_ENDPOINT = 'https://typhinetdev.herokuapp.com/api/';
10 changes: 4 additions & 6 deletions client/src/registerServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@
export default function register() {
if (!process.env.PUBLIC_URL && process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
// The URL constructor is available in all browsers that support SW.

// const publicUrl = new URL(process.env.PUBLIC_URL, window.location);
// if (publicUrl.origin !== window.location.origin) {
// // Our service worker won't work if PUBLIC_URL is on a different origin
// from what our page is served on. This might happen if a CDN is used to
// serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374
// return;
}

// // from what our page is served on. This might happen if a CDN is used to
// // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374
// return;
// }
// window.addEventListener("load", () => {
// const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;

Expand Down

0 comments on commit 6ac8987

Please sign in to comment.