You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Matterwiki/client/app/index.jsx

30 lines
1.1 KiB
React

import React from 'react';
import {render} from 'react-dom';
import { Router, Route, IndexRoute, IndexRedirect, hashHistory } from 'react-router';
import App from './static/app.jsx';
import Home from './static/home.jsx';
import Login from './static/login.jsx';
import About from './static/about.jsx';
import Product from './static/product.jsx';
import Article from './static/article.jsx';
import NewArticle from './static/new.jsx';
import EditArticle from './static/edit.jsx';
import ArticleHistory from './static/history.jsx';
render(
<Router history={hashHistory}>
<Route path="/" component={App}>
<IndexRoute component={Login}/>
<Route path="home" component={Home}/>
<Route path="login" component={Login}/>
<Route path="about" component={About}/>
<Route path="product" component={Product}/>
<Route path="article/new" component={NewArticle}/>
<Route path="article/edit/:articleId" component={EditArticle}/>
<Route path="article/history/:articleId" component={ArticleHistory}/>
<Route path="article/:articleId" component={Article}/>
</Route>
</Router>
, document.getElementById('app'));