1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

continuing file structure

This commit is contained in:
Tim Daubenschütz 2015-05-18 09:56:16 +02:00
parent 0d0069a2a6
commit 25a715ddb3
4 changed files with 25 additions and 16 deletions

View File

@ -4,15 +4,7 @@ import React from 'react';
import Router from 'react-router'; import Router from 'react-router';
import AscribeApp from './components/ascribe_app'; import AscribeApp from './components/ascribe_app';
import ArtworkList from './components/artwork_list'; import routes from '.routes';
var Route = Router.Route;
var routes = (
<Route handler={AscribeApp}>
<Route path="artworks" handler={ArtworkList} />
</Route>
);
Router.run(routes, Router.HashLocation, (AscribeApp) => { Router.run(routes, Router.HashLocation, (AscribeApp) => {
React.render( React.render(

View File

@ -1,13 +1,13 @@
import React from 'react'; import React from 'react';
class ArtworkList extends React.Component { class ArtworkList extends React.Component {
render () { render () {
return ( return (
<ul> <ul>
<li>This is an artwork</li> <li>This is an artwork</li>
</ul> </ul>
); );
} }
}; };
export default ArtworkList; export default ArtworkList;

View File

@ -0,0 +1,5 @@
class ArtworkListStore {
constructor() {
this.artworkList = [];
}
}

12
js/routes.js Normal file
View File

@ -0,0 +1,12 @@
import Router from 'react-router';
import AscribeApp from './components/ascribe_app';
import ArtworkList from './components/artwork_list';
var Route = Router.Route;
var routes = (
<Route handler={AscribeApp}>
<Route path="artworks" handler={ArtworkList} />
</Route>
);