diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-03 19:57:52 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-03 19:57:52 +0200 |
| commit | e21538fe99277d31cacde6f8596a24156faaefd7 (patch) | |
| tree | bae27c4e55542546ab73aadb19468c466057ac2a /app | |
| parent | c05a918de5f52b0333da4ab3e96b0a76611fe101 (diff) | |
datasettes
Diffstat (limited to 'app')
| -rw-r--r-- | app/client/modules/samplernn/samplernn.datasets.js | 9 | ||||
| -rw-r--r-- | app/client/modules/samplernn/samplernn.show.js | 5 |
2 files changed, 3 insertions, 11 deletions
diff --git a/app/client/modules/samplernn/samplernn.datasets.js b/app/client/modules/samplernn/samplernn.datasets.js index d37102b..0a42b8f 100644 --- a/app/client/modules/samplernn/samplernn.datasets.js +++ b/app/client/modules/samplernn/samplernn.datasets.js @@ -17,20 +17,17 @@ const samplernnModule = { class SampleRNNDatasets extends Component { constructor(props){ super(props) - console.log('ba') this.fileOptions = this.fileOptions.bind(this) this.pickFile = this.pickFile.bind(this) } componentWillMount(){ const id = this.props.id || this.props.match.params.id || localStorage.getItem('samplernn.last_id') - console.log(id) console.log('load dataset:', id) const { match, samplernn, actions } = this.props if (id === 'new') return if (id) { - localStorage.setItem('samplernn.last_id', id) + if (parseInt(id)) localStorage.setItem('samplernn.last_id', id) if (! samplernn.folder || samplernn.folder.id !== id) { - console.log('load directories') actions.load_directories(id) } } @@ -65,12 +62,12 @@ class SampleRNNDatasets extends Component { const { samplernn, match, history } = this.props const id = this.props.id || localStorage.getItem('samplernn.last_id') console.log(this.props.id) - if (this.props.id && this.props.id !== 'new') return null if (samplernn.loading) { console.log('loading') return <span>Loading</span> } - if (!samplernn.folder || !samplernn.data.folders.length) { + console.log(samplernn) + if (!samplernn.data.folder || !samplernn.data.folders.length) { console.log('no folders, redirect to /new') return history.push('/samplernn/new/') } diff --git a/app/client/modules/samplernn/samplernn.show.js b/app/client/modules/samplernn/samplernn.show.js index a6018c5..24d60ab 100644 --- a/app/client/modules/samplernn/samplernn.show.js +++ b/app/client/modules/samplernn/samplernn.show.js @@ -17,12 +17,7 @@ const samplernnModule = { } class SampleRNNShow extends Component { - constructor(){ - super() - console.log('piss') - } render(){ - console.log('dick') return ( <SampleRNNDatasets id={this.props.match.params.id} |
