1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-19 11:21:29 +00:00

Finally testing, things should be working a bit better now

This commit is contained in:
Scott Tolksdorf
2017-01-01 13:31:33 -08:00
parent 95c09ba7ad
commit 5ba3f98696
8 changed files with 70 additions and 84 deletions

View File

@@ -18,11 +18,11 @@ const Homebrew = React.createClass({
getDefaultProps: function() {
return {
url : '',
welcomeText : '',
changelog : '',
version : '0.0.0',
account : undefined,
brew : {}
user : undefined,
brew : {},
brews : []
};
},
componentWillMount: function() {
@@ -38,23 +38,8 @@ const Homebrew = React.createClass({
Router = CreateRouter({
'/edit/:id' : (args) => {
if(!this.props.brew.editId){
return <ErrorPage errorId={args.id}/>
}
return <EditPage />
},
'/share/:id' : (args) => {
if(!this.props.brew.shareId){
return <ErrorPage errorId={args.id}/>
}
return <SharePage
id={args.id}
brew={this.props.brew} />
},
'/edit/:id' : <EditPage />,
'/share/:id' : <SharePage />,
/*
'/user/:username' : (args) => {
return <UserPage
@@ -68,15 +53,9 @@ const Homebrew = React.createClass({
'/print' : (args, query) => {
return <PrintPage query={query}/>;
},
'/new' : (args) => {
return <NewPage />
},
'/changelog' : (args) => {
return <SharePage
brew={{title : 'Changelog', text : this.props.changelog}} />
},
'*' : <HomePage
welcomeText={this.props.welcomeText} />,
'/new' : <NewPage />,
'/changelog' : <SharePage />,
'*' : <HomePage />,
});
},
render : function(){