From 05c02a6ac493138f1414b01281cc7ae57ce29d5f Mon Sep 17 00:00:00 2001 From: tommasini <46944231+tommasini@users.noreply.github.com> Date: Fri, 7 Jul 2023 17:26:22 +0100 Subject: [PATCH] fix: Delete collectible media reproductor (#6753) --- .../UI/CollectibleMediaReproductor/index.js | 102 ------------------ 1 file changed, 102 deletions(-) delete mode 100644 app/components/UI/CollectibleMediaReproductor/index.js diff --git a/app/components/UI/CollectibleMediaReproductor/index.js b/app/components/UI/CollectibleMediaReproductor/index.js deleted file mode 100644 index 3e7db3c1952..00000000000 --- a/app/components/UI/CollectibleMediaReproductor/index.js +++ /dev/null @@ -1,102 +0,0 @@ -import React, { useState } from 'react'; -import PropTypes from 'prop-types'; -import { StyleSheet, View } from 'react-native'; -import RemoteImage from '../../Base/RemoteImage'; -import Identicon from '../Identicon'; -import MediaPlayer from '../../Views/MediaPlayer'; -import { useTheme } from '../../../util/theme'; - -const styles = StyleSheet.create({ - listWrapper: { - width: 50, - height: 50, - borderRadius: 10, - overflow: 'hidden', - }, - fullWrapper: { - width: 260, - height: 260, - flex: 1, - alignItems: 'center', - justifyContent: 'center', - }, - listImage: { - width: 50, - height: 50, - }, - fullImage: { - height: 260, - width: 260, - }, -}); - -/** - * View that renders an ERC-721 Token image - */ -export default function CollectibleMediaPlayer({ - collectible, - renderFull, - containerStyle, - iconStyle, -}) { - const { colors } = useTheme(); - const [fallbackImage, setFallbackImage] = useState(null); - - const fallback = () => { - const { address, tokenId } = collectible; - setFallbackImage( - `https://storage.opensea.io/${address.toLowerCase()}/${tokenId}.png`, - ); - }; - const mediaFallback = () => setFallbackImage(collectible.image); - - return ( - - {!fallbackImage && collectible?.animation?.length !== 0 && ( - - )} - {collectible?.image?.length !== 0 ? ( - - ) : ( - - )} - - ); -} - -CollectibleMediaPlayer.propTypes = { - /** - * Collectible object (in this case ERC721 token) - */ - collectible: PropTypes.object, - /** - * Whether collectible image has to render in full size - */ - renderFull: PropTypes.bool, - /** - * Container view style - */ - containerStyle: PropTypes.object, - /** - * Image style - */ - iconStyle: PropTypes.object, -};