1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-17 23:01:30 +00:00

Edit and sharing should be working, deploying for testing

This commit is contained in:
Scott Tolksdorf
2015-12-20 14:21:25 -05:00
parent ef7a500940
commit 8a4d840717
7 changed files with 175 additions and 39 deletions

View File

@@ -13,16 +13,23 @@ var Homebrew = React.createClass({
getDefaultProps: function() {
return {
url : "",
text : ""
text : "",
entry : {
text : "",
shareId : null,
editId : null,
createdAt : null,
updatedAt : null,
}
};
},
componentWillMount: function() {
Router = CreateRouter({
'/homebrew/edit/:id' : (args) => {
return <EditPage id={args.id} text={this.props.text} />
return <EditPage id={args.id} entry={this.props.entry} />
},
'/homebrew/share/:id' : (args) => {
return <SharePage id={args.id} text={this.props.text} />
return <SharePage id={args.id} entry={this.props.entry} />
},
'/homebrew*' : <HomePage />,
});