From 816aa0b15f3766e340d8722f03e8b3a7633ab6fb Mon Sep 17 00:00:00 2001
From: Dessalines <tyhou13@gmx.com>
Date: Wed, 20 Mar 2019 18:22:31 -0700
Subject: Adding initial UI and Websocket server.

---
 ui/src/index.tsx | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 ui/src/index.tsx

(limited to 'ui/src/index.tsx')

diff --git a/ui/src/index.tsx b/ui/src/index.tsx
new file mode 100644
index 00000000..36e5681d
--- /dev/null
+++ b/ui/src/index.tsx
@@ -0,0 +1,42 @@
+import { render, Component } from 'inferno';
+import { HashRouter, Route, Switch } from 'inferno-router';
+
+import { Navbar } from './components/navbar';
+import { Home } from './components/home';
+import { Login } from './components/login';
+
+import './main.css';
+
+import { WebSocketService } from './services';
+
+const container = document.getElementById('app');
+
+class Index extends Component<any, any> {
+
+  constructor(props, context) {
+    super(props, context);
+    WebSocketService.Instance;
+  }
+
+  render() {
+    return (
+      <HashRouter>
+        <Navbar />
+        <div class="mt-3 p-0">
+          <Switch>
+            <Route exact path="/" component={Home} />
+            <Route path={`/login`} component={Login} />
+            {/*
+            <Route path={`/search/:type_/:q/:page`} component={Search} />
+            <Route path={`/submit`} component={Submit} />
+            <Route path={`/user/:id`} component={Login} />
+            <Route path={`/community/:id`} component={Login} /> 
+            */}
+          </Switch>
+        </div>
+      </HashRouter>
+    );
+  }
+}
+
+render(<Index />, container);
-- 
cgit v1.2.3

