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 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(
|
||||||
|
@ -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;
|
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