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:
parent
0d0069a2a6
commit
25a715ddb3
10
js/app.js
10
js/app.js
@ -4,15 +4,7 @@ import React from 'react';
|
||||
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>
|
||||
);
|
||||
import routes from '.routes';
|
||||
|
||||
Router.run(routes, Router.HashLocation, (AscribeApp) => {
|
||||
React.render(
|
||||
|
@ -1,13 +1,13 @@
|
||||
import React from 'react';
|
||||
|
||||
class ArtworkList extends React.Component {
|
||||
render () {
|
||||
return (
|
||||
<ul>
|
||||
<li>This is an artwork</li>
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
render () {
|
||||
return (
|
||||
<ul>
|
||||
<li>This is an artwork</li>
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default ArtworkList;
|
5
js/components/stores/artwork_list_store.js
Normal file
5
js/components/stores/artwork_list_store.js
Normal file
@ -0,0 +1,5 @@
|
||||
class ArtworkListStore {
|
||||
constructor() {
|
||||
this.artworkList = [];
|
||||
}
|
||||
}
|
12
js/routes.js
Normal file
12
js/routes.js
Normal 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>
|
||||
);
|
Loading…
Reference in New Issue
Block a user