From f23a8ee4d356645ae3f91862552b256f230c6bcb Mon Sep 17 00:00:00 2001
From: Florian Dold <florian@dold.me>
Date: Mon, 11 Oct 2021 10:58:55 +0200
Subject: anastasis-webui: first commit

---
 packages/anastasis-webui/src/components/app.tsx | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 packages/anastasis-webui/src/components/app.tsx

(limited to 'packages/anastasis-webui/src/components/app.tsx')

diff --git a/packages/anastasis-webui/src/components/app.tsx b/packages/anastasis-webui/src/components/app.tsx
new file mode 100644
index 000000000..5abb12a3d
--- /dev/null
+++ b/packages/anastasis-webui/src/components/app.tsx
@@ -0,0 +1,23 @@
+import { FunctionalComponent, h } from 'preact';
+import { Route, Router } from 'preact-router';
+
+import Home from '../routes/home';
+import Profile from '../routes/profile';
+import NotFoundPage from '../routes/notfound';
+import Header from './header';
+
+const App: FunctionalComponent = () => {
+    return (
+        <div id="preact_root">
+            <Header />
+            <Router>
+                <Route path="/" component={Home} />
+                <Route path="/profile/" component={Profile} user="me" />
+                <Route path="/profile/:user" component={Profile} />
+                <NotFoundPage default />
+            </Router>
+        </div>
+    );
+};
+
+export default App;
-- 
cgit v1.2.3

