route_config_test.ts

pull/695/head
Rick Carlino 2018-03-04 10:17:24 -06:00
parent 2ef4f54699
commit ca5a0c6b82
3 changed files with 10 additions and 3 deletions

View File

@ -0,0 +1,7 @@
import { topLevelRoutes } from "./route_config";
describe("route configs", () => {
it("generates all of them", () => {
topLevelRoutes
});
});

View File

@ -59,7 +59,7 @@ const designerRoutes = {
]
};
export const routes = {
export const topLevelRoutes = {
component: App,
indexRoute: controlsRoute,
childRoutes: [

View File

@ -9,7 +9,7 @@ import { ready } from "./config/actions";
import { Session } from "./session";
import { attachToRoot } from "./util";
import { Callback } from "i18next";
import { routes } from "./route_config";
import { topLevelRoutes } from "./route_config";
interface RootComponentProps { store: Store; }
@ -30,7 +30,7 @@ export class RootComponent extends React.Component<RootComponentProps, {}> {
// ==== END HACK ====
return <Provider store={_store}>
<Router history={history}>
{routes}
{topLevelRoutes}
</Router>
</Provider>;
}