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 () { const { asset: { claimData: { name, claimId } } } = this.props; this.props.onFileRequest(name, claimId); } render () { const { status, error, asset: { claimData: { name, claimId, contentType, fileExt, thumbnail } } } = this.props; 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;