ImportData: move FileChooserCSV params into CSVImporter

chats_paste
Alex Gleason 2020-09-27 12:34:35 -05:00
rodzic e6e4a5c447
commit 0666557282
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 4 dodań i 10 usunięć

Wyświetl plik

@ -264,11 +264,3 @@ export const FileChooserLogo = props => (
FileChooserLogo.defaultProps = {
accept: ['image/svg', 'image/png'],
};
export const FileChooserCSV = props => (
<SimpleInput type='file' {...props} />
);
FileChooserCSV.defaultProps = {
accept: ['text/csv'],
};

Wyświetl plik

@ -4,9 +4,9 @@ import { injectIntl } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
import {
SimpleInput,
SimpleForm,
FieldsGroup,
FileChooserCSV,
} from 'soapbox/features/forms';
export default @connect()
@ -55,7 +55,9 @@ class CSVImporter extends ImmutablePureComponent {
<FieldsGroup>
<div className='fields-row file-picker'>
<div className='fields-row__column fields-group fields-row__column-6'>
<FileChooserCSV
<SimpleInput
type='file'
accept={['.csv', 'text/csv']}
label={intl.formatMessage(messages.input_label)}
hint={intl.formatMessage(messages.input_hint)}
onChange={this.handleFileChange}