1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-18 05:41:29 +00:00

Adding new navitems and finishing the edit and share page

This commit is contained in:
Scott Tolksdorf
2016-05-09 16:54:32 -04:00
parent d5b8c60317
commit ed7decb42b
16 changed files with 350 additions and 204 deletions

View File

@@ -17,7 +17,8 @@ var Homebrew = React.createClass({
welcomeText : "",
changelog : "",
brew : {
text : "",
title : '',
text : '',
shareId : null,
editId : null,
createdAt : null,
@@ -28,14 +29,14 @@ var Homebrew = React.createClass({
componentWillMount: function() {
Router = CreateRouter({
'/homebrew/edit/:id' : (args) => {
return <EditPage id={args.id} entry={this.props.brew} />
return <EditPage id={args.id} brew={this.props.brew} />
},
'/homebrew/share/:id' : (args) => {
return <SharePage id={args.id} entry={this.props.brew} />
return <SharePage id={args.id} brew={this.props.brew} />
},
'/homebrew/changelog' : (args) => {
return <SharePage entry={{text : this.props.changelog}} />
return <SharePage brew={{title : 'Changelog', text : this.props.changelog}} />
},
'/homebrew/new' : (args) => {
return <NewPage />