aboutsummaryrefslogtreecommitdiffstats
path: root/ui-react/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui-react/src/index.js')
-rw-r--r--ui-react/src/index.js24
1 files changed, 21 insertions, 3 deletions
diff --git a/ui-react/src/index.js b/ui-react/src/index.js
index b2fc3b0f6..8236eb15c 100644
--- a/ui-react/src/index.js
+++ b/ui-react/src/index.js
@@ -22,10 +22,28 @@
*/
import React from 'react';
import ReactDOM from 'react-dom';
+
+import { Route, Switch, BrowserRouter } from 'react-router-dom'
import OnapClamp from './OnapClamp';
+import NotFound from './components/app/NotFound';
+import LoginPage from './components/app/login/LoginPage';
+import LoginFailedPage from './components/app/login/LoginFailedPage';
+import BasicAuthLogin from './components/app/login/BasicAuthLogin';
+import LoginRoute from './components/route/LoginRoute';
-ReactDOM.render(
- <OnapClamp/>,
- document.getElementById('root')
+const routing = (
+ <BrowserRouter>
+ <div>
+ <Switch>
+ <LoginRoute exact path="/" component={OnapClamp} />
+ <Route path="/basicAuthLogin" component={BasicAuthLogin} />
+ <Route path="/login" component={LoginPage} />
+ <Route path="/loginFailed" component={LoginFailedPage} />
+ <Route component={NotFound} />
+ </Switch>
+ </div>
+ </BrowserRouter>
)
+
+ReactDOM.render(routing, document.getElementById('root'))