mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 10:33:41 -05:00
timeline: fix scrollbar issues on URL previews
* Prevents rendering an empty url-previews div * Sets overflow-x to "auto" instead of "scroll" Signed-off-by: Sumner Evans <me@sumnerevans.com>
This commit is contained in:
parent
5d41b49462
commit
c101dbaab1
2 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@ div.url-previews {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
overflow-x: scroll;
|
overflow-x: auto;
|
||||||
|
|
||||||
> div.url-preview {
|
> div.url-preview {
|
||||||
margin: 0.5rem 0;
|
margin: 0.5rem 0;
|
||||||
|
|
|
@ -33,7 +33,7 @@ const URLPreviews = ({ event, room }: {
|
||||||
}
|
}
|
||||||
|
|
||||||
const previews = (event.content["com.beeper.linkpreviews"] ?? event.content["m.url_previews"]) as URLPreview[]
|
const previews = (event.content["com.beeper.linkpreviews"] ?? event.content["m.url_previews"]) as URLPreview[]
|
||||||
if (!previews) {
|
if (!previews || !previews.length) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
return <div className="url-previews">
|
return <div className="url-previews">
|
||||||
|
|
Loading…
Add table
Reference in a new issue