Skip to content

Commit 486f34e

Browse files
committed
refactor: remove unused code
1 parent 7f6bb2a commit 486f34e

File tree

2 files changed

+1
-144
lines changed

2 files changed

+1
-144
lines changed

lib/downloads.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,5 @@ export const generateDownloadLink = (
3232
ext: "pdf" | "csv"
3333
): void => {
3434
const path = buildDownloadPath(filename, ext);
35-
try {
36-
const anchor = document.createElement("a");
37-
anchor.href = path;
38-
anchor.target = "_blank";
39-
document.body.appendChild(anchor);
40-
anchor.click();
41-
document.body.removeChild(anchor);
42-
} catch (_err) {
43-
// Swallow errors silently; caller may choose to add its own handling.
44-
}
35+
window.open(path, "_blank");
4536
};

pages/downloads/[...key].tsx

Lines changed: 0 additions & 134 deletions
This file was deleted.

0 commit comments

Comments
 (0)