alpinesmuseum-public/assets/js/components/ContribView/CVUploadInput.js

22 lines
597 B
JavaScript

import React from 'react';
import reduxLang from '../../middleware/lang';
const CVUploadInput = ({ onFileChange, t, locale, reset }) => {
const onImageChange = event => {
if (event.target.files && event.target.files[0]) {
let img = event.target.files[0];
onFileChange(img);
}
};
return (
<div className='CVForm CVUploadInput' id='upload-wetransfer-container'>
<label className='small-text'>{t('upload')}</label>
<input type="file" id="img" name="img" accept="image/*" onChange={onImageChange} />
</div>
);
};
export default reduxLang('ContribView')(CVUploadInput);