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:
parent
6ae7ff0d4b
commit
c6097fe5c2
@ -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(
|
||||
|
11
js/components/actions/artwork_list_actions.js
Normal file
11
js/components/actions/artwork_list_actions.js
Normal file
@ -0,0 +1,11 @@
|
||||
import alt from '../alt';
|
||||
|
||||
class ArtworkListActions {
|
||||
constructor() {
|
||||
this.generateActions(
|
||||
'updateArtworks'
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
export default alt.createAction(ArtworkListActions);
|
@ -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>
|
||||
|
@ -1,5 +1,9 @@
|
||||
import alt from '../alt';
|
||||
|
||||
class ArtworkListStore {
|
||||
constructor() {
|
||||
this.artworkList = [];
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
export default alt.createStore(ArtworkListStore);
|
@ -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;
|
Loading…
Reference in New Issue
Block a user