diff --git a/src/components/MediaPreview.tsx b/src/components/MediaPreview.tsx
index 7d7cb2b4..f2ebb458 100644
--- a/src/components/MediaPreview.tsx
+++ b/src/components/MediaPreview.tsx
@@ -10,7 +10,7 @@ import {
import {Trans} from '@lingui/macro'
import {parseTenorGif} from '#/lib/strings/embed-player'
-import {atoms as a} from '#/alf'
+import {atoms as a, useTheme} from '#/alf'
import {Text} from '#/components/Typography'
import {PlayButtonIcon} from '#/components/video/PlayButtonIcon'
@@ -43,10 +43,10 @@ export function Embed({
))}
)
- } else if (AppBskyEmbedExternal.isView(embed) && embed.external.thumb) {
+ } else if (AppBskyEmbedExternal.isView(media) && media.external.thumb) {
let url: URL | undefined
try {
- url = new URL(embed.external.uri)
+ url = new URL(media.external.uri)
} catch {}
if (url) {
const {success} = parseTenorGif(url)
@@ -54,17 +54,17 @@ export function Embed({
return (
)
}
}
- } else if (AppBskyEmbedVideo.isView(embed)) {
+ } else if (AppBskyEmbedVideo.isView(media)) {
return (
-
+
)
}
@@ -91,12 +91,13 @@ export function ImageItem({
alt?: string
children?: React.ReactNode
}) {
+ const t = useTheme()
return (