From e706e8ed3554d5d579e938341673ff6de07c4613 Mon Sep 17 00:00:00 2001 From: Nattaphong Klinjan Date: Tue, 5 Nov 2024 14:12:53 +0100 Subject: [PATCH] =?UTF-8?q?Legge=20til=20tittel=20props=20til=20action=20b?= =?UTF-8?q?utton=20component=20for=20=C3=A5=20kunne=20gi=20et=20navn=20til?= =?UTF-8?q?=20nedlastet=20fil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../document-action-buttons/DocumentActionButtons.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/document-action-buttons/DocumentActionButtons.tsx b/src/components/document-action-buttons/DocumentActionButtons.tsx index ea2eb99a..5df24666 100644 --- a/src/components/document-action-buttons/DocumentActionButtons.tsx +++ b/src/components/document-action-buttons/DocumentActionButtons.tsx @@ -10,6 +10,7 @@ import styles from "./DocumentActionButtons.module.css"; interface IProps { preview: Link; + title: string; amplitudeEventData: DokumentHendelse; } @@ -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(); }