Remove 'app' code to reduce clutter

This commit is contained in:
infinite-persistence 2022-05-13 16:16:39 +08:00
parent a7493b2c80
commit d5e56d20b6
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0

View file

@ -19,7 +19,6 @@ export default function useGetThumbnail(
const isCollection = claim && claim.value_type === 'collection'; const isCollection = claim && claim.value_type === 'collection';
const thumbnailInClaim = claim && claim.value && claim.value.thumbnail && claim.value.thumbnail.url; const thumbnailInClaim = claim && claim.value && claim.value.thumbnail && claim.value.thumbnail.url;
// @if TARGET='web'
if (thumbnailInClaim) { if (thumbnailInClaim) {
thumbnailToUse = thumbnailInClaim; thumbnailToUse = thumbnailInClaim;
} else if (claim && isImage && isFree) { } else if (claim && isImage && isFree) {
@ -27,24 +26,6 @@ export default function useGetThumbnail(
} else if (isCollection) { } else if (isCollection) {
thumbnailToUse = MISSING_THUMB_DEFAULT; thumbnailToUse = MISSING_THUMB_DEFAULT;
} }
// @endif
// @if TARGET='app'
thumbnailToUse = thumbnailInClaim;
//
// Temporarily disabled until we can call get with "save_blobs: off"
//
// React.useEffect(() => {
// if (hasClaim && isImage && isFree) {
// if (streamingUrl) {
// setThumbnail(streamingUrl);
// } else if (!shouldHide) {
// getFile(uri);
// }
// }
// }, [hasClaim, isFree, isImage, streamingUrl, uri, shouldHide]);
// @endif
const [thumbnail, setThumbnail] = React.useState(thumbnailToUse); const [thumbnail, setThumbnail] = React.useState(thumbnailToUse);
React.useEffect(() => { React.useEffect(() => {