2017-10-09 22:09:42 -06:00
|
|
|
// import DevTools from "mobx-react-devtools";
|
2017-06-30 01:08:51 -06:00
|
|
|
import * as React from "react";
|
2018-07-02 15:22:59 -06:00
|
|
|
import { Redirect, Route, Switch } from "react-router";
|
2017-09-10 21:38:07 -06:00
|
|
|
import { Container } from "semantic-ui-react";
|
2017-09-06 23:54:22 -06:00
|
|
|
|
2018-08-07 21:21:26 +03:00
|
|
|
import { MessagesView, NavBar } from "@client/components";
|
|
|
|
import * as p from "@client/pages";
|
2018-08-11 19:59:20 +03:00
|
|
|
import * as route from "@client/routePaths";
|
2017-08-29 23:21:36 -06:00
|
|
|
|
2018-06-26 11:53:22 -06:00
|
|
|
// tslint:disable:ordered-imports
|
2017-08-29 23:21:36 -06:00
|
|
|
import "font-awesome/css/font-awesome.css";
|
2017-06-20 08:45:25 -06:00
|
|
|
import "semantic-ui-css/semantic.css";
|
2018-08-07 21:21:26 +03:00
|
|
|
import "@client/styles/app";
|
2017-06-20 08:45:25 -06:00
|
|
|
|
2018-07-02 15:22:59 -06:00
|
|
|
function NavContainer() {
|
2018-06-25 13:37:37 -06:00
|
|
|
return (
|
2018-07-02 15:22:59 -06:00
|
|
|
<Container className="app">
|
|
|
|
<NavBar/>
|
|
|
|
|
2018-07-24 12:55:43 -06:00
|
|
|
<Switch>
|
2018-08-11 19:59:20 +03:00
|
|
|
<Route path={route.device(":deviceId")} component={p.DevicePage}/>
|
|
|
|
<Route path={route.messagesTest} component={p.MessagesTestPage}/>
|
2018-07-24 12:55:43 -06:00
|
|
|
<Redirect to="/"/>
|
|
|
|
</Switch>
|
2018-07-02 15:22:59 -06:00
|
|
|
|
|
|
|
<MessagesView/>
|
|
|
|
</Container>
|
2018-06-25 13:37:37 -06:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2018-07-02 15:22:59 -06:00
|
|
|
export default function App() {
|
2018-06-25 13:37:37 -06:00
|
|
|
return (
|
2018-07-02 15:22:59 -06:00
|
|
|
<Switch>
|
2018-08-11 19:59:20 +03:00
|
|
|
<Route path={route.login} component={p.LoginPage}/>
|
|
|
|
<Route path={route.logout} component={p.LogoutPage}/>
|
2018-07-02 15:22:59 -06:00
|
|
|
<NavContainer/>
|
|
|
|
</Switch>
|
2018-06-25 13:37:37 -06:00
|
|
|
);
|
|
|
|
}
|