mirror of
https://github.com/wassname/talk.git
synced 2026-08-04 13:23:35 +08:00
hardcode routes in react app
This commit is contained in:
@@ -3,5 +3,4 @@ public/bundle.js
|
||||
public/embed/comment-stream
|
||||
.DS_Store
|
||||
npm-debug.log
|
||||
config.json
|
||||
yarn.lock
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"basePath": "admin",
|
||||
"talkHost": "http://localhost:16180",
|
||||
"xeniaHost": "http://localhost:16180"
|
||||
}
|
||||
@@ -8,17 +8,16 @@ import store from 'services/store'
|
||||
import CommentStream from 'containers/CommentStream'
|
||||
import EmbedLink from 'components/EmbedLink'
|
||||
import Configure from 'containers/Configure'
|
||||
import config from 'services/config'
|
||||
|
||||
export default class App extends React.Component {
|
||||
render (props) {
|
||||
return (
|
||||
<Provider store={store}>
|
||||
<Router history={browserHistory}>
|
||||
<Route path={config.basePath} component={ModerationQueue} />
|
||||
<Route path={`${config.basePath}/embed`} component={CommentStream} />
|
||||
<Route path={`${config.basePath}/embedlink`} component={EmbedLink} />
|
||||
<Route path={`${config.basePath}/configure`} component={Configure} />
|
||||
<Route path='admin' component={ModerationQueue} />
|
||||
<Route path='admin/embed' component={CommentStream} />
|
||||
<Route path='admin/embedlink' component={EmbedLink} />
|
||||
<Route path='admin/configure' component={Configure} />
|
||||
</Router>
|
||||
</Provider>
|
||||
)
|
||||
|
||||
@@ -9,14 +9,14 @@ export default (props) => (
|
||||
<Layout fixedDrawer>
|
||||
<Header title='Talk'>
|
||||
<Navigation>
|
||||
<Link className={styles.navLink} to={`/${config.basePath}/`}>Moderate</Link>
|
||||
<Link className={styles.navLink} to={`/${config.basePath}/configure`}>Configure</Link>
|
||||
<Link className={styles.navLink} to={`/admin/`}>Moderate</Link>
|
||||
<Link className={styles.navLink} to={`/admin/configure`}>Configure</Link>
|
||||
</Navigation>
|
||||
</Header>
|
||||
<Drawer>
|
||||
<Navigation>
|
||||
<Link className={styles.navLink} to={`/${config.basePath}/`}>Moderate</Link>
|
||||
<Link className={styles.navLink} to={`/${config.basePath}/configure`}>Configure</Link>
|
||||
<Link className={styles.navLink} to={`/admin/`}>Moderate</Link>
|
||||
<Link className={styles.navLink} to={`/admin/configure`}>Configure</Link>
|
||||
</Navigation>
|
||||
</Drawer>
|
||||
{props.children}
|
||||
|
||||
Reference in New Issue
Block a user