Skip to content

Commit

Permalink
Legge til tittel props til action button component for å kunne gi et …
Browse files Browse the repository at this point in the history
…navn til nedlastet fil
  • Loading branch information
nattaphongklinjan committed Nov 5, 2024
1 parent bdfd296 commit e706e8e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import styles from "./DocumentActionButtons.module.css";

interface IProps {
preview: Link;
title: string;
amplitudeEventData: DokumentHendelse;
}

Expand Down Expand Up @@ -51,7 +52,7 @@ export function DocumentActionButtons(props: IProps) {
function handleDownload() {
logDocumentDownloaded();
const a = document.createElement("a");
a.download = props.amplitudeEventData.dokumentTittel;
a.download = props.title;
a.href = preview.href;
a.click();
}
Expand Down

0 comments on commit e706e8e

Please sign in to comment.