import React from 'react';
import './index.less'

const MailA = (props) => {
    const {data} = props;
    const imgExt = ["png","jpg","jpeg","bmp","gif"];
    const type = data.FILENAME && data.FILENAME.split('.')[1];
    return (
        <div>
            <div className={`adjunct-card ${imgExt.indexOf(type) > -1 ? 'adjunct-pdf' : 'adjunct-word'}`}>
                <div className="adjunct-title">
                    <img alt="" src={imgExt.indexOf(type) > -1 ? '/img/test/pdf.png' : '/img/test/word.png'} className="adjunct-img"/>
                    <div className="adjunct-content">
                        <p className="adjunct-title-1">{data.FILENAME}</p>
                    </div>
                </div>
            </div>
        </div>
    );
};

export default MailA;
