mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 10:33: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") {
|
} 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
|
||||||
<>
|
href={mediaURL}
|
||||||
<a
|
target="_blank"
|
||||||
href={mediaURL}
|
rel="noopener noreferrer"
|
||||||
target="_blank"
|
download={content.filename ?? content.body}
|
||||||
rel="noopener noreferrer"
|
>
|
||||||
download={content.filename ?? content.body}
|
<DownloadIcon height={32} width={32}/> {content.filename ?? content.body}
|
||||||
><DownloadIcon height={32} width={32}/> {content.filename ?? content.body}</a>
|
</a>, "file-container", {}]
|
||||||
</>,
|
|
||||||
"file-container",
|
|
||||||
{},
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
return [null, "unknown-container", {}]
|
return [null, "unknown-container", {}]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue