Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #112

Merged
merged 7 commits into from
Feb 15, 2024
Merged

Dev #112

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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