File size: 1,003 Bytes
1e92f2d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | import { localize } from 'i18n-calypso';
import PropTypes from 'prop-types';
import { PureComponent } from 'react';
import importerConfig from 'calypso/lib/importer/importer-config';
import FileImporter from './file-importer';
class ImporterWordPress extends PureComponent {
static displayName = 'ImporterWordPress';
static propTypes = {
siteTitle: PropTypes.string.isRequired,
isAtomic: PropTypes.bool,
isJetpack: PropTypes.bool,
importerStatus: PropTypes.shape( {
importerState: PropTypes.string.isRequired,
errorData: PropTypes.shape( {
type: PropTypes.string.isRequired,
description: PropTypes.string.isRequired,
} ),
statusMessage: PropTypes.string,
} ),
};
render() {
const importerData = importerConfig( {
siteTitle: this.props.siteTitle,
isAtomic: this.props.isAtomic,
isJetpack: this.props.isJetpack,
} ).wordpress;
return <FileImporter importerData={ importerData } { ...this.props } />;
}
}
export default localize( ImporterWordPress );
|