import React, { PropTypes, Component } from 'react' import Dropzone from 'react-dropzone' class ImportDialogBox extends Component { constructor (props) { super(props) this.state = { showImportInstructions: false } } handleExport = format => () => { window.open(`${window.location.pathname}/export.${format}`, '_blank') } 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 (
To upload a file, drop it here:
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).
You can choose which columns to include in your data. Topics must have a name field. Synapses must have Topic 1 and Topic 2.
* 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.
* If you are importing a list of links, you can use a Link column in place of the Name column.