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

outsourced routes to separate file and created a boilerplate action and store

This commit is contained in:
Tim Daubenschütz 2015-05-18 13:43:42 +02:00
parent 6ae7ff0d4b
commit c6097fe5c2
5 changed files with 23 additions and 5 deletions

View File

@ -4,7 +4,7 @@ import React from 'react';
import Router from 'react-router';
import AscribeApp from './components/ascribe_app';
import routes from '.routes';
import routes from './routes';
Router.run(routes, Router.HashLocation, (AscribeApp) => {
React.render(

View File

@ -0,0 +1,11 @@
import alt from '../alt';
class ArtworkListActions {
constructor() {
this.generateActions(
'updateArtworks'
);
};
};
export default alt.createAction(ArtworkListActions);

View File

@ -4,7 +4,7 @@ import Router from 'react-router';
var RouteHandler = Router.RouteHandler;
class AscribeApp extends React.Component {
render () {
render() {
return (
<div>
<h1>ascribe all the things!</h1>

View File

@ -1,5 +1,9 @@
import alt from '../alt';
class ArtworkListStore {
constructor() {
this.artworkList = [];
}
};
};
export default alt.createStore(ArtworkListStore);

View File

@ -1,7 +1,8 @@
import React from 'react';
import Router from 'react-router';
import AscribeApp from './components/ascribe_app';
import ArtworkList from './components/artwork_list';
import ArtworkList from './components/gui/artwork_list';
var Route = Router.Route;
@ -9,4 +10,6 @@ var routes = (
<Route handler={AscribeApp}>
<Route path="artworks" handler={ArtworkList} />
</Route>
);
);
export default routes;