import React from 'react';
import { render } from 'react-dom';
import { Router, Route, IndexRoute, browserHistory } from 'react-router';
import 'current-input';

import App from './components/App';
import Home from './components/Home';
import PageNotFound from './components/PageNotFound';
import ExampleComponent from './components/ExampleComponent';
import ExampleTwoDeepComponent from './components/ExampleTwoDeepComponent';
import Post from './components/Post';


const routes = (
    <Route path="/" mapMenuTitle="Home" component={App}>
        <IndexRoute component={Home} />

        <Route path="example" mapMenuTitle="Example" component={ExampleComponent}>
          <Route path="two-deep" mapMenuTitle="Two Deep" component={ExampleTwoDeepComponent} />
        </Route>
        <Route path="sample-post" mapMenuTitle="Sample post" component={Post} />
        <Route path="post/:category/:" mapMenuTitle="Post" component={PageNotFound} />

        <Route path="*" mapMenuTitle="Page Not Found" component={PageNotFound} />
    </Route>
);


render(
  <Router
    history={browserHistory}
    routes={routes}
  />,
  document.getElementById('root')
);

import React from 'react';
import { render } from 'react-dom';
import { Router, Route, IndexRoute, browserHistory } from 'react-router';
import 'current-input';

import App from './components/App';
import Home from './components/Home';
import PageNotFound from './components/PageNotFound';
import ExampleComponent from './components/ExampleComponent';
import ExampleTwoDeepComponent from './components/ExampleTwoDeepComponent';
import Post from './components/Post';


const routes = (
    <Route path="/" mapMenuTitle="Home" component={App}>
        <IndexRoute component={Home} />

        <Route path="example" mapMenuTitle="Example" component={ExampleComponent}>
          <Route path="two-deep" mapMenuTitle="Two Deep" component={ExampleTwoDeepComponent} />
        </Route>
        <Route path="posts/:category/:slug" component={Post} />

        <Route path="*" mapMenuTitle="Page Not Found" component={PageNotFound} />
    </Route>
);


render(
  <Router
    history={browserHistory}
    routes={routes}
  />,
  document.getElementById('root')
);

Add route to a single post
Add route to a single post
