dynamic react router

This commit is contained in:
Eric Hulburd
2016-02-29 18:20:00 -06:00
parent 51eaa19a92
commit c890132f2b
44 changed files with 1163 additions and 733 deletions

View File

@@ -1,3 +1,4 @@
import {browserHistory} from 'react-router';
import app from './../../app';
app();
app(browserHistory);

View File

@@ -1,15 +1,29 @@
// All react templates should be pre-compiled for development.
// run 'gulp compile_react_templates'
import fs from 'fs';
import aboutRt from './../../dashboard/about/about.rt.js';
import houseRt from './../../dashboard/house/house.rt.js';
import layoutRt from './../../dashboard/layout/layout.rt.js';
import energyRt from './../../dashboard/energy/energy.rt.js';
import energyGraphRt from './../../dashboard/energy/graph/graph.rt.js';
import energyTableRt from './../../dashboard/energy/table/table.rt.js';
import powerRt from './../../dashboard/power/power.rt.js';
import powerGraphRt from './../../dashboard/power/graph/graph.rt.js';
import powerTableRt from './../../dashboard/power/table/table.rt.js';
const TEMPLATES = Object.freeze({
const TEMPLATES = {
about: aboutRt,
house: houseRt,
layout: layoutRt,
energy: energyRt,
energy_graph: energyGraphRt,
energy_table: energyTableRt,
power: powerRt,
});
power_graph: powerGraphRt,
power_table: powerTableRt
};
class Templates {