import React from 'react'; import { Link } from 'react-router-dom'; const { assetDefaults: { thumbnail: defaultThumbnail } } = require('../../../config/siteConfig.js'); const AssetPreview = ({ claimData: { name, claimId, fileExt, contentType, thumbnail } }) => { const directSourceLink = `${claimId}/${name}.${fileExt}`; const showUrlLink = `/${claimId}/${name}`; return (
{(() => { switch (contentType) { case 'image/jpeg': case 'image/jpg': case 'image/png': case 'image/gif': return ( {name} ); case 'video/mp4': return ( {name} ); default: return (

unsupported file type

); } })()}
); }; export default AssetPreview;