From e21538fe99277d31cacde6f8596a24156faaefd7 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 3 Jun 2018 19:57:52 +0200 Subject: datasettes --- app/client/modules/samplernn/samplernn.datasets.js | 9 +++------ app/client/modules/samplernn/samplernn.show.js | 5 ----- 2 files changed, 3 insertions(+), 11 deletions(-) (limited to 'app') 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 Loading } - 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 (