mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-01-11 19:55:10 +00:00
32 lines
738 B
JavaScript
32 lines
738 B
JavaScript
'use strict';
|
|
|
|
define([
|
|
'react',
|
|
'react-router',
|
|
'templates/app/index', 'app/components/index',
|
|
'app/actions/project', 'app/actions/build'
|
|
], function(
|
|
React,
|
|
Router,
|
|
template, Components,
|
|
ProjectActions, BuildActions
|
|
) {
|
|
var Route = React.createFactory(Router.Route),
|
|
DefaultRoute = React.createFactory(Router.DefaultRoute);
|
|
|
|
var routes = (
|
|
Route({name: 'dashboard', path: '/', handler: Components.App},
|
|
Route({name: 'projects', path: '/projects', handler: Components.ProjectsComponents.List})
|
|
)
|
|
);
|
|
|
|
Router.run(routes, Router.HistoryLocation, function(Handler) {
|
|
React.render(template({
|
|
Component: Handler
|
|
}), document.getElementById('content'));
|
|
});
|
|
|
|
ProjectActions.readAll();
|
|
BuildActions.readAll();
|
|
});
|