forked from Mirrors/gomuks
web/timeline: allow opening lightbox from url preview image
This commit is contained in:
parent
6830e5d1cc
commit
588a994b55
1 changed files with 2 additions and 0 deletions
|
@ -19,6 +19,7 @@ import { RoomStateStore, usePreference } from "@/api/statestore"
|
|||
import { MemDBEvent, URLPreview } from "@/api/types"
|
||||
import { ImageContainerSize, calculateMediaSize } from "@/util/mediasize"
|
||||
import ClientContext from "../ClientContext"
|
||||
import { LightboxContext } from "../modal/Lightbox.tsx"
|
||||
import "./URLPreviews.css"
|
||||
|
||||
const URLPreviews = ({ event, room }: {
|
||||
|
@ -58,6 +59,7 @@ const URLPreviews = ({ event, room }: {
|
|||
loading="lazy"
|
||||
style={style.media}
|
||||
src={mediaURL}
|
||||
onClick={use(LightboxContext)!}
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue