1
0
Fork 0
forked from Mirrors/gomuks

web/timeline: remove redundant fragment around file download button

This commit is contained in:
Tulir Asokan 2024-12-02 23:38:32 +02:00
parent 229751a286
commit dee7e5c72d

View file

@ -69,18 +69,14 @@ export const useMediaContent = (
} else if (content.msgtype === "m.audio") { } else if (content.msgtype === "m.audio") {
return [<audio controls src={mediaURL} preload="none"/>, "audio-container", {}] return [<audio controls src={mediaURL} preload="none"/>, "audio-container", {}]
} else if (content.msgtype === "m.file") { } else if (content.msgtype === "m.file") {
return [ return [<a
<>
<a
href={mediaURL} href={mediaURL}
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
download={content.filename ?? content.body} download={content.filename ?? content.body}
><DownloadIcon height={32} width={32}/> {content.filename ?? content.body}</a> >
</>, <DownloadIcon height={32} width={32}/> {content.filename ?? content.body}
"file-container", </a>, "file-container", {}]
{},
]
} }
return [null, "unknown-container", {}] return [null, "unknown-container", {}]
} }