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

Stubbed out a userpage

This commit is contained in:
Scott Tolksdorf
2016-11-23 23:59:57 -05:00
parent 750f5c1330
commit 9e14872f06
6 changed files with 55 additions and 8 deletions

View File

@@ -6,6 +6,7 @@ const CreateRouter = require('pico-router').createRouter;
const HomePage = require('./pages/homePage/homePage.jsx');
const EditPage = require('./pages/editPage/editPage.jsx');
const UserPage = require('./pages/userPage/userPage.jsx');
const SharePage = require('./pages/sharePage/sharePage.jsx');
const NewPage = require('./pages/newPage/newPage.jsx');
const ErrorPage = require('./pages/errorPage/errorPage.jsx');
@@ -50,9 +51,11 @@ const Homebrew = React.createClass({
id={args.id}
brew={this.props.brew} />
},
'/changelog' : (args) => {
return <SharePage
brew={{title : 'Changelog', text : this.props.changelog}} />
'/user/:username' : (args) => {
return <UserPage
username={args.username}
brews={this.props.brews}
/>
},
'/print/:id' : (args, query) => {
return <PrintPage brew={this.props.brew} query={query}/>;
@@ -63,6 +66,10 @@ const Homebrew = React.createClass({
'/new' : (args) => {
return <NewPage />
},
'/changelog' : (args) => {
return <SharePage
brew={{title : 'Changelog', text : this.props.changelog}} />
},
'*' : <HomePage
welcomeText={this.props.welcomeText} />,
});