mirror of
https://github.com/Leado123/Leado123.github.io.git
synced 2026-10-01 00:32:59 +00:00
Update syllabus_comp.tsx
This commit is contained in:
@@ -10,11 +10,11 @@ function SyllabusListing({className, professor, fileName}: ClassListing) {
|
|||||||
|
|
||||||
async function handleDownload() {
|
async function handleDownload() {
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
a.href= `http://192.168.1.202:4000/files/${fileName}`;
|
a.href= `https://api.sharesyllabus.me/files/${fileName}`;
|
||||||
a.download = fileName || 'syllabus.pdf';
|
a.download = fileName || 'syllabus.pdf';
|
||||||
a.click();
|
a.click();
|
||||||
a.remove();
|
a.remove();
|
||||||
window.URL.revokeObjectURL(`http://192.168.1.202:4000/files/${fileName}`);
|
window.URL.revokeObjectURL(`https://api.sharesyllabus.me/files/${fileName}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return(
|
return(
|
||||||
|
|||||||
Reference in New Issue
Block a user