diff options
| author | Wes Bos <wesbos@gmail.com> | 2017-08-11 14:56:13 -0400 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2017-08-11 14:56:13 -0400 |
| commit | 416c2cbae0e69b724876d232bf813eefd7550174 (patch) | |
| tree | ce7109c0f61dbeee7077164cb48a4681214e0464 /components/CreateItem.js | |
| parent | 222ab374d53a206332b1ab51c7c43f6d5dc7a31e (diff) | |
getting there
Diffstat (limited to 'components/CreateItem.js')
| -rw-r--r-- | components/CreateItem.js | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/components/CreateItem.js b/components/CreateItem.js index 843263c..b29b210 100644 --- a/components/CreateItem.js +++ b/components/CreateItem.js @@ -36,17 +36,13 @@ class CreateLink extends Component { <div> { this.state.loading ? 'LOADING...' : 'Ready!' } <form onSubmit={this._createLink}> - <p>Image: {this.state.image}</p> - <input - value={this.state.title} - onChange={(e) => this.setState({ title: e.target.value })} - type='text' - placeholder='A description for the link' - /> - <input - onChange={this.uploadFile} - type='file' - /> + <p> + Image + <input onChange={this.uploadFile} type='file'/> + </p> + <p>Title + <input value={this.state.title} onChange={(e) => this.setState({ title: e.target.value })} type='text' placeholder='A description for the link'/> + </p> <textarea value={this.state.description} onChange={(e) => this.setState({ description: e.target.value })} @@ -77,9 +73,7 @@ class CreateLink extends Component { }); this.setState({ loading: false }); } - } - // When we submit this mutation, we need to update our store - we have a few ways to do that: // One - we can go nucular and run refetchQueries() which will just go get everything - this is easy, but at the cost of efficiency. |
