From 647d2f74dfcb379c0505a271d58d4f009e14beee Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Thu, 18 Feb 2021 02:13:54 -0500 Subject: [PATCH] Revert "Use fallback image for broken thumbnails" This reverts commit 6aae5987e6d4d88a356509c1a38f5049d5f7f53c. --- config.js | 1 - ui/component/fileThumbnail/view.jsx | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/config.js b/config.js index aca1591b7..f042ad2e0 100644 --- a/config.js +++ b/config.js @@ -41,7 +41,6 @@ const config = { PINNED_URI_2: process.env.PINNED_URI_2, PINNED_LABEL_2: process.env.PINNED_LABEL_2, KNOWN_APP_DOMAINS: process.env.KNOWN_APP_DOMAINS ? process.env.KNOWN_APP_DOMAINS.split(',') : [], - THUMBNAIL_FALLBACK: process.env.THUMBNAIL_FALLBACK, }; config.URL_LOCAL = `http://localhost:${config.WEB_SERVER_PORT}`; diff --git a/ui/component/fileThumbnail/view.jsx b/ui/component/fileThumbnail/view.jsx index e5fd1b18e..ad818c19c 100644 --- a/ui/component/fileThumbnail/view.jsx +++ b/ui/component/fileThumbnail/view.jsx @@ -2,7 +2,6 @@ import type { Node } from 'react'; import { getThumbnailCdnUrl } from 'util/thumbnail'; import React from 'react'; -import { THUMBNAIL_FALLBACK } from 'config'; import FreezeframeWrapper from './FreezeframeWrapper'; import Placeholder from './placeholder.png'; import classnames from 'classnames'; @@ -15,11 +14,10 @@ type Props = { claim: ?StreamClaim, doResolveUri: string => void, className?: string, - fallbackThumbnail?: string, }; function FileThumbnail(props: Props) { - const { claim, uri, doResolveUri, thumbnail: rawThumbnail, children, allowGifs = false, className, fallbackThumbnail = THUMBNAIL_FALLBACK } = props; + const { claim, uri, doResolveUri, thumbnail: rawThumbnail, children, allowGifs = false, className } = props; const passedThumbnail = rawThumbnail && rawThumbnail.trim().replace(/^http:\/\//i, 'https://'); const thumbnailFromClaim = uri && claim && claim.value && claim.value.thumbnail ? claim.value.thumbnail.url : undefined; @@ -48,11 +46,9 @@ function FileThumbnail(props: Props) { } // @endif - const cleanUrl = url ? url.replace(/'/g, "\\'") : ''; - return (