1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 09:35:10 +01:00

Cleanup and reorder routes

This commit is contained in:
vrde 2015-07-10 18:21:42 +02:00
parent d5ea4e515d
commit df5295dffd
5 changed files with 3 additions and 9 deletions

View File

@ -1,6 +1,6 @@
'use strict'; 'use strict';
require("babel/polyfill"); require('babel/polyfill');
import React from 'react'; import React from 'react';
import Router from 'react-router'; import Router from 'react-router';

View File

@ -6,7 +6,7 @@ import Header from '../components/header';
import Footer from '../components/footer'; import Footer from '../components/footer';
import GlobalNotification from './global_notification'; import GlobalNotification from './global_notification';
let Link = Router.Link; // let Link = Router.Link;
let RouteHandler = Router.RouteHandler; let RouteHandler = Router.RouteHandler;

View File

@ -14,9 +14,9 @@ let baseUrl = AppConstants.baseUrl;
function getRoutes(commonRoutes) { function getRoutes(commonRoutes) {
return ( return (
<Route name="app" path={baseUrl} handler={App}> <Route name="app" path={baseUrl} handler={App}>
{commonRoutes}
<Redirect from={baseUrl} to="login" /> <Redirect from={baseUrl} to="login" />
<Redirect from={baseUrl + '/'} to="login" /> <Redirect from={baseUrl + '/'} to="login" />
{commonRoutes}
</Route> </Route>
); );
} }

View File

@ -9,7 +9,6 @@ import App from './app';
import AppConstants from '../../../constants/application_constants'; import AppConstants from '../../../constants/application_constants';
let Route = Router.Route; let Route = Router.Route;
// let Redirect = Router.Redirect;
let baseUrl = AppConstants.baseUrl; let baseUrl = AppConstants.baseUrl;

View File

@ -3,8 +3,6 @@
import React from 'react'; import React from 'react';
import Router from 'react-router'; import Router from 'react-router';
import AscribeApp from './components/ascribe_app';
import getPrizeRoutes from './components/whitelabel/prize/routes'; import getPrizeRoutes from './components/whitelabel/prize/routes';
import getDefaultRoutes from './components/routes'; import getDefaultRoutes from './components/routes';
@ -19,12 +17,9 @@ import PasswordResetContainer from './components/password_reset_container';
import SettingsContainer from './components/settings_container'; import SettingsContainer from './components/settings_container';
import CoaVerifyContainer from './components/coa_verify_container'; import CoaVerifyContainer from './components/coa_verify_container';
import AppConstants from './constants/application_constants';
import RegisterPiece from './components/register_piece'; import RegisterPiece from './components/register_piece';
let Route = Router.Route; let Route = Router.Route;
let Redirect = Router.Redirect;
let baseUrl = AppConstants.baseUrl;
const COMMON_ROUTES = ( const COMMON_ROUTES = (