diff --git a/index.html b/index.html index 85cf795..4de385a 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,13 @@ - Personal Website + + + + Create TanStack App - academic
diff --git a/src/components/Card.tsx b/src/components/Card.tsx index bdffc76..c5c7b4c 100644 --- a/src/components/Card.tsx +++ b/src/components/Card.tsx @@ -9,24 +9,6 @@ interface Props { } export default function Card({ title, content, id, downloads }: Props) { - function download(path: URL, fileName = 'file') { - fetch(path) - .then((response) => response.blob()) - .then((blob) => { - const url = window.URL.createObjectURL(new Blob([blob])) - - const link = document.createElement('a') - link.href = url - link.download = fileName - - document.body.appendChild(link) - - link.click() - - link.parentNode?.removeChild(link) - }) - } - return (

@@ -42,11 +24,10 @@ export default function Card({ title, content, id, downloads }: Props) { {downloads.map((e, i) => (
  • download(e.link, e.filename)} > {e.title} diff --git a/src/types/cards.tsx b/src/types/cards.tsx index 6f4131b..81152ad 100644 --- a/src/types/cards.tsx +++ b/src/types/cards.tsx @@ -1,7 +1,7 @@ export type CardDownloadType = { title: string filename: string - link: URL + link: string } export type CardType = {