Created
December 2, 2015 14:43
-
-
Save khrtz/ad2cc32cc25f9cc85351 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import Router, { Route, Routes, Link, DefaultRoute, RouteHandler, Handler } from 'react-router'; | |
import Header from './header.jsx' | |
import Footer from './footer.jsx' | |
import TopPage from './containers/TopPage.jsx' | |
import Project from './components/project.jsx' | |
import SearchList from './components/search-list.jsx' | |
import AboutMore from './handlers/about-more.jsx' | |
import NewRegistration from './handlers/new-registration.jsx' | |
import Login from './handlers/login.jsx' | |
export default class App extends React.Component{ | |
render() { | |
return ( | |
<div className="Site-container"> | |
<RouteHandler data={data} featureLimit={1} attentionLimit={3} almostLimit={4} latestLimit={4} searchListLimit={3} /> | |
</div> | |
); | |
} | |
} | |
var routes = ( | |
<Route name="app" path="/" handler={App}> | |
<Route name="search" path="/search" handler={SearchList} /> | |
<Route name="about_mor" path="/about_more" handler={AboutMore} /> | |
<Route name="login" path="/login" handler={Login} /> | |
<Route name="project" path="/project" handler={Project} /> | |
<Route name="new-registration" path="/new_registration" handler={NewRegistration} /> | |
<DefaultRoute handler={TopPage} /> | |
</Route> | |
); | |
Router.run(routes, (Handler) => { | |
React.render(<Handler />, document.getElementById('container')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment