From a7465a66cd49a943b725f0a3ef45d0b1511b48db Mon Sep 17 00:00:00 2001
From: Jules Laplace <julescarbon@gmail.com>
Date: Thu, 29 Jun 2017 04:03:58 +0200
Subject: upload files

---
 client/components/Folders/Folders.jsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'client/components/Folders/Folders.jsx')

diff --git a/client/components/Folders/Folders.jsx b/client/components/Folders/Folders.jsx
index e5d5d76..0d34f58 100644
--- a/client/components/Folders/Folders.jsx
+++ b/client/components/Folders/Folders.jsx
@@ -23,6 +23,8 @@ export default class Folders extends Component {
     folder.open = ! folder.open
     if (folder.open && ! folder.files) {
       client.file.index({ 'folder_id': folder.id }).then( files => {
+        console.log(files)
+        folder.files = files
         this.props.openFolder(folder)
       })
     }
@@ -41,7 +43,7 @@ export default class Folders extends Component {
         <b>folders</b> <button onClick={() => this.openModal()}>+ folder</button>
         {folders}
         <Modal visible={this.state.adding} onClose={() => this.closeModal()}>
-          <FolderForm />
+          <FolderForm addFolder={this.props.addFolder} />
         </Modal>
       </div>
     )
-- 
cgit v1.2.3-70-g09d2

