40 lines
1.1 KiB
TypeScript
Raw Normal View History

2017-10-09 22:09:42 -06:00
// import DevTools from "mobx-react-devtools";
import * as React from "react";
import { Redirect, Route, Switch } from "react-router";
import { Container } from "semantic-ui-react";
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";
import "semantic-ui-css/semantic.css";
2018-08-07 21:21:26 +03:00
import "@client/styles/app";
function NavContainer() {
2018-06-25 13:37:37 -06:00
return (
<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>
<MessagesView/>
</Container>
2018-06-25 13:37:37 -06:00
);
}
export default function App() {
2018-06-25 13:37:37 -06:00
return (
<Switch>
2018-08-11 19:59:20 +03:00
<Route path={route.login} component={p.LoginPage}/>
<Route path={route.logout} component={p.LogoutPage}/>
<NavContainer/>
</Switch>
2018-06-25 13:37:37 -06:00
);
}