From 2263f412817d6d2d36372e7617feb0d97fa57af8 Mon Sep 17 00:00:00 2001
From: Jules Laplace <julescarbon@gmail.com>
Date: Tue, 4 Jul 2017 02:11:44 +0200
Subject: break out browser and tasks

---
 client/components/Folders/Folders.jsx | 58 -----------------------------------
 1 file changed, 58 deletions(-)
 delete mode 100644 client/components/Folders/Folders.jsx

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

diff --git a/client/components/Folders/Folders.jsx b/client/components/Folders/Folders.jsx
deleted file mode 100644
index f63dae2..0000000
--- a/client/components/Folders/Folders.jsx
+++ /dev/null
@@ -1,58 +0,0 @@
-import { h, Component } from 'preact'
-import { Link } from 'react-router-dom'
-
-import Modal from '../Modal.jsx'
-import FolderForm from './FolderForm.jsx'
-
-import client from '../../client.js'
-
-export default class Folders extends Component {
-  constructor(props) {
-    super()
-    this.state = {
-      adding: false,
-    }
-  }
-  openModal() {
-    this.setState({ adding: true })
-  }
-  closeModal() {
-    this.setState({ adding: false })
-  }
-  toggle(folder) {
-    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)
-      })
-    }
-  }
-  render() {
-    console.log(this.props)
-    const folders = (this.props.folders || []).map( (folder,i) => {
-      return (
-        <div key={i} onClick={() => this.toggle(folder)}>
-          <span class='name'>{folder.name}</span>
-        </div>
-      )
-    })
-    return (
-      <div class='folders'>
-        <div class='heading'>
-          <b>folders</b>
-          <div class='buttons'>
-            <button onClick={() => this.openModal()}>+ folder</button>
-          </div>
-        </div>
-        <div class='list'>
-          {folders}
-        </div>
-        <Modal visible={this.state.adding} onClose={() => this.closeModal()}>
-          <FolderForm addFolder={this.props.addFolder} onClose={() => this.closeModal()} />
-        </Modal>
-      </div>
-    )
-  }
-}
-- 
cgit v1.2.3-70-g09d2

