mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-19 18:13:41 -05:00
web/timeline: remove redundant fragment around file download button
This commit is contained in:
parent
229751a286
commit
dee7e5c72d
1 changed files with 8 additions and 12 deletions
|
@ -69,18 +69,14 @@ export const useMediaContent = (
|
|||
} else if (content.msgtype === "m.audio") {
|
||||
return [<audio controls src={mediaURL} preload="none"/>, "audio-container", {}]
|
||||
} else if (content.msgtype === "m.file") {
|
||||
return [
|
||||
<>
|
||||
<a
|
||||
href={mediaURL}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
download={content.filename ?? content.body}
|
||||
><DownloadIcon height={32} width={32}/> {content.filename ?? content.body}</a>
|
||||
</>,
|
||||
"file-container",
|
||||
{},
|
||||
]
|
||||
return [<a
|
||||
href={mediaURL}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
download={content.filename ?? content.body}
|
||||
>
|
||||
<DownloadIcon height={32} width={32}/> {content.filename ?? content.body}
|
||||
</a>, "file-container", {}]
|
||||
}
|
||||
return [null, "unknown-container", {}]
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue