import React from 'react'; import { Link } from 'react-router-dom' const AssetPreview = ({ name, claimId, fileExt, contentType }) => { const directSourceLink = `${claimId}/${name}.${fileExt}`; const showUrlLink = `${claimId}/${name}`; const previewHolderStyle = { clear : 'both', display : 'inline-block', width : '31%', padding : '0px', margin : '1%', backgroundColor: 'black', }; const assetStyle = { width : '100%', padding: '0px', margin : '0px', }; return (
{(() => { 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 AssetPreview;