diff --git a/app/src/components/FilePreview.js b/app/src/components/FilePreview.js index a9580635..c6ed6e39 100644 --- a/app/src/components/FilePreview.js +++ b/app/src/components/FilePreview.js @@ -100,8 +100,8 @@ function getEpubViewerURL(previewFile) { * A component rather than part of `getIframePreviewModal` because it reads the theme: the * modal builders are plain functions called from an event handler, where hooks cannot run. */ -function IframePreview({url, gatePdf}) { - const {mediaFilterEnabled} = React.useContext(ThemeContext); +export function IframePreview({url, gatePdf}) { + const {isDark, mediaFilterEnabled} = React.useContext(ThemeContext); /* * `gatePdf` only for PDFs. Text and the EPUB viewer are documents of our own, which the @@ -119,8 +119,12 @@ function IframePreview({url, gatePdf}) {