summaryrefslogtreecommitdiffstats
path: root/frontend/components/UpdateItem.js
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2018-03-12 14:06:25 -0400
committerWes Bos <wesbos@gmail.com>2018-03-12 14:06:25 -0400
commit46a0ba30ef54a7e36206481a4f5b2bf1f9702fca (patch)
treea95fd534fc27761d8b26d0dffcdb5f300f7a61c7 /frontend/components/UpdateItem.js
parentf7bea2d1b7be2b70dceb25c9837f608b538e9cec (diff)
wip
Diffstat (limited to 'frontend/components/UpdateItem.js')
-rw-r--r--frontend/components/UpdateItem.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/frontend/components/UpdateItem.js b/frontend/components/UpdateItem.js
index febe2ad..e97b4aa 100644
--- a/frontend/components/UpdateItem.js
+++ b/frontend/components/UpdateItem.js
@@ -1,6 +1,7 @@
import React, { Component } from 'react';
import { graphql, gql, compose } from 'react-apollo';
import { SINGLE_ITEM_QUERY, UPDATE_LINK_MUTATION } from '../queries';
+import Form from './styles/Form';
import { singleItemEnhancer } from '../enhancers/enhancers';
@@ -51,9 +52,9 @@ class UpdateItem extends Component {
const item = this.props.findItem.items[0];
return (
<div>
- <h2>Edit {this.props.id}</h2>
- {this.state.loading ? 'LOADING...' : 'Ready!'}
- <form onSubmit={this.updateItem}>
+ <Form onSubmit={this.updateItem}>
+ <h2>Edit {item.title}</h2>
+ {this.state.loading ? 'LOADING...' : 'Ready!'}
<fieldset disabled={this.state.loading}>
<label htmlFor="title">
Title
@@ -71,7 +72,7 @@ class UpdateItem extends Component {
</label>
<button type="submit">Save...</button>
</fieldset>
- </form>
+ </Form>
</div>
);
}