import React from 'react'; import ProgressBar from 'components/ProgressBar/index'; import { LOCAL_CHECK, UNAVAILABLE, ERROR, AVAILABLE } from 'constants/asset_display_states'; class AssetDisplay extends React.Component { componentDidMount () { this.props.onFileRequest(this.props.claimData.name, this.props.claimData.claimId); } render () { const status = this.props.status; const error = this.props.error; const { name, claimId, contentType, fileExt, thumbnail } = this.props.claimData; return (
{(status === LOCAL_CHECK) &&

Checking to see if Spee.ch has your asset locally...

} {(status === UNAVAILABLE) &&

Sit tight, we're searching the LBRY blockchain for your asset!

Curious what magic is happening here? Learn more.

} {(status === ERROR) &&

Unfortunately, we couldn't download your asset from LBRY. You can help us out by sharing the below error message in the LBRY discord.

{error}

} {(status === AVAILABLE) && (() => { switch (contentType) { case 'image/jpeg': case 'image/jpg': case 'image/png': return ( {name}/ ); case 'image/gif': return ( {name} ); case 'video/mp4': return ( ); default: return (

Unsupported file type

); } })() }
); } }; export default AssetDisplay;