factorio-server-manager/ui/index.js

28 lines
1.1 KiB
JavaScript
Raw Normal View History

import React from 'react';
import ReactDOM from 'react-dom';
import {Router, Route, browserHistory, IndexRoute} from 'react-router';
import App from './App/App.jsx';
import ModsContent from './App/components/ModsContent.jsx';
import LogsContent from './App/components/LogsContent.jsx';
import SavesContent from './App/components/SavesContent.jsx';
import ConfigContent from './App/components/ConfigContent.jsx';
import LoginContent from './App/components/LoginContent.jsx';
import Index from './App/components/Index.jsx';
2016-04-30 05:59:13 +02:00
var loggedIn = false
ReactDOM.render((
<Router history={browserHistory}>
2016-04-30 05:59:13 +02:00
<Route path="/login" component={LoginContent} loggedIn={loggedIn}/>
<Route path="/" component={App} loggedIn={loggedIn}>
<IndexRoute component={Index}/>
2016-04-30 05:59:13 +02:00
<Route path="/server" component={Index}/>
<Route path="/mods" component={ModsContent}/>
<Route path="/logs" component={LogsContent}/>
<Route path="/saves" component={SavesContent}/>
<Route path="/config" component={ConfigContent}/>
</Route>
</Router>
), document.getElementById('app'))