mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-11 21:08:36 +03:00
enables inline PDFs for sources
This commit is contained in:
@@ -10,7 +10,7 @@ export default ({ media, viewIdx, translations, switchLanguage, langIdx }) => {
|
||||
const shiftW = el ? el.getBoundingClientRect().width : 0
|
||||
|
||||
function renderMedia (media) {
|
||||
const { path, type, poster } = media
|
||||
let { path, type, poster } = media
|
||||
switch (type) {
|
||||
case 'Image':
|
||||
return (
|
||||
@@ -53,6 +53,10 @@ export default ({ media, viewIdx, translations, switchLanguage, langIdx }) => {
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
case 'Document':
|
||||
return (
|
||||
<iframe className='source-document' src={path} />
|
||||
)
|
||||
default:
|
||||
return (
|
||||
<NoSource failedUrls={[`Application does not support extension: ${path.split('.')[1]}`]} />
|
||||
|
||||
Reference in New Issue
Block a user