From 2f2c1ef4029dee17be0d16acdd60b7d1718d519f Mon Sep 17 00:00:00 2001
From: Jules Laplace <julescarbon@gmail.com>
Date: Wed, 19 Jul 2017 02:06:56 +0200
Subject: refactor file browser stuff

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

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

diff --git a/client/components/Browser/Folders/FolderForm.jsx b/client/components/Browser/Folders/FolderForm.jsx
deleted file mode 100644
index ad3e321..0000000
--- a/client/components/Browser/Folders/FolderForm.jsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import { h, Component } from 'preact'
-
-import client from '../../../client.js'
-
-export default class FolderForm extends Component {
-  constructor(props) {
-    super()
-    this.state = {
-      name: '',
-    }
-    this.updateState = this.updateState.bind(this)
-    this.handleSubmit = this.handleSubmit.bind(this)
-  }
-  updateState(event){
-    const name = event.target.name
-    let value = event.target.value
-    console.log(name, value)
-    this.setState({
-      [name]: value,
-      error: null,
-    })
-  }
-  handleSubmit(event) {
-    event.preventDefault()
-    let rec = Object.assign({}, this.state)
-    delete rec.error
-    this.props.onClose()
-    client.folder.create( rec ).then( (data) => {
-      this.props.addFolder( data )
-    })
-  }
-  render() {
-    return (
-      <div class='form'>
-        <h1>new folder</h1>
-        <div>
-          <label for='folders_folder_name'>Name</label>
-          <input type='text' id='folders_folder_name' name='name' value={this.state.name} onChange={this.updateState} />
-        </div>
-        <div>
-          <label></label>
-          <button onClick={this.handleSubmit}>Create</button>
-        </div>
-      </div>
-    )
-  }
-}
-- 
cgit v1.2.3-70-g09d2

