From e1bc6a3331d3d2037a938541cc3fe189b7ea1484 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 26 Jun 2018 23:52:04 +0200 Subject: fix filelists on dashboard --- app/client/dashboard/dashboard.component.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/client/dashboard/dashboard.component.js b/app/client/dashboard/dashboard.component.js index b3cf6e4..a75535f 100644 --- a/app/client/dashboard/dashboard.component.js +++ b/app/client/dashboard/dashboard.component.js @@ -51,14 +51,12 @@ class Dashboard extends Component { files={renders[key]} orderBy='date desc' fields={'name date epoch size'} - onClick={(file, e) => { - if (key === 'samplernn') { - e.preventDefault() - e.stopPropagation() - console.log('picked a file', file) - this.handlePick(file) - } - }} + onClick={key === 'samplernn' ? (file, e) => { + e.preventDefault() + e.stopPropagation() + console.log('picked a file', file) + this.handlePick(file) + } : null} /> ); -- cgit v1.2.3-70-g09d2