0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-28 13:32:39 +00:00

Fixed titles saving

This commit is contained in:
Scott Tolksdorf
2016-05-14 13:59:21 -04:00
parent c4c09f0a69
commit 5537d974ff
6 changed files with 16 additions and 22 deletions

View File

@@ -1,14 +1,9 @@
var React = require('react');
var _ = require('lodash');
var cx = require('classnames');
var Nav = require('naturalcrit/nav/nav.jsx');
var Navbar = React.createClass({
render : function(){
return <Nav.base>
<Nav.section>
@@ -16,9 +11,8 @@ var Navbar = React.createClass({
<Nav.item href='/homebrew' className='homebrewLogo'>
<div>The Homebrewery</div>
</Nav.item>
<Nav.item>v1.5.0</Nav.item>
<Nav.item>v2.0.0</Nav.item>
</Nav.section>
{this.props.children}
</Nav.base>
}

View File

@@ -120,7 +120,10 @@ var EditPage = React.createClass({
request
.put('/homebrew/api/update/' + this.props.brew.editId)
.send({text : this.state.text})
.send({
text : this.state.text,
title : this.state.title
})
.end((err, res) => {
console.log('done', res.body);
this.savedBrew = res.body;

View File

@@ -18,7 +18,7 @@ const KEY = 'naturalCrit-homebrew-new';
var NewPage = React.createClass({
getInitialState: function() {
return {
title : 'My Awesome Brew v99.99',
title : 'My Awesome Brew v99',
text: '',
isSaving : false
};