remove unused code
This commit is contained in:
parent
1c011b1427
commit
43a60fd19a
|
@ -12,6 +12,7 @@ class FileExporter extends React.PureComponent {
|
||||||
data: PropTypes.array,
|
data: PropTypes.array,
|
||||||
type: PropTypes.oneOf(['json', 'csv']),
|
type: PropTypes.oneOf(['json', 'csv']),
|
||||||
title: PropTypes.string,
|
title: PropTypes.string,
|
||||||
|
label: PropTypes.string,
|
||||||
defaultPath: PropTypes.string,
|
defaultPath: PropTypes.string,
|
||||||
onFileCreated: PropTypes.func,
|
onFileCreated: PropTypes.func,
|
||||||
};
|
};
|
||||||
|
@ -24,12 +25,6 @@ class FileExporter extends React.PureComponent {
|
||||||
super(props);
|
super(props);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillMount() {
|
|
||||||
this.setState({
|
|
||||||
path: this.props.initPath || null,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
handleFileCreation(filename, data) {
|
handleFileCreation(filename, data) {
|
||||||
const { onFileCreated } = this.props;
|
const { onFileCreated } = this.props;
|
||||||
fs.writeFile(filename, data, err => {
|
fs.writeFile(filename, data, err => {
|
||||||
|
|
Loading…
Reference in a new issue