remove instructions from ImportDialogBox (#1022)

* remove instructions from ImportDialogBox

* link back to docs.metamaps.cc for import instructions
This commit is contained in:
Devin Howard 2017-01-11 13:50:37 -05:00 committed by GitHub
parent 0952c0f3c9
commit 08109ee5de

View file

@ -6,7 +6,6 @@ class ImportDialogBox extends Component {
super(props)
this.state = {
showImportInstructions: false
}
}
@ -15,21 +14,9 @@ class ImportDialogBox extends Component {
}
handleFile = (files, e) => {
// // for some reason it uploads twice, so we need this debouncer
// // eslint-disable-next-line no-return-assign
// this.debouncer = this.debouncer || window.setTimeout(() => this.debouncer = null, 10)
// if (!this.debouncer) {
// this.props.onFileAdded(files[0])
// }
this.props.onFileAdded(files[0])
}
toggleShowInstructions = e => {
this.setState({
showImportInstructions: !this.state.showImportInstructions
})
}
render = () => {
return (
<div className="import-dialog">
@ -47,23 +34,7 @@ class ImportDialogBox extends Component {
>
Drop files here!
</Dropzone>
<p>
<a onClick={this.toggleShowInstructions} style={{ textDecoration: 'underline', cursor: 'pointer' }}>
Show/hide import instructions
</a>
</p>
{!this.state.showImportInstructions ? null : (<div>
<p>
You can import topics and synapses by uploading a spreadsheet here.
The file should be in comma-separated format (when you save, change the
filetype from .xls to .csv).
</p>
<img src={this.props.exampleImageUrl} style={{ width: '100%' }} />
<p style={{ marginTop: '1em' }}>You can choose which columns to include in your data. Topics must have a name field. Synapses must have Topic 1 and Topic 2.</p>
<p>&nbsp;</p>
<p> * There are many valid import formats. Try exporting a map to see what columns you can include in your import data. You can also copy-paste from Excel to import, or import JSON.</p>
<p> * If you are importing a list of links, you can use a Link column in place of the Name column.</p>
</div>)}
<p>See <a href="https://docs.metamaps.cc/importing_and_exporting_data.html">docs.metamaps.cc</a> for instructions.</p>
</div>
)
}