summaryrefslogtreecommitdiff
path: root/src/index.tsx
diff options
context:
space:
mode:
authorSam Nystrom <sam@samnystrom.dev>2024-03-13 05:03:22 +0000
committerSam Nystrom <sam@samnystrom.dev>2024-03-13 20:17:07 -0400
commit052cc1a5a4668d7cb17fb273a022aa5b820d1faa (patch)
treedbce2d2d10bb8c3cc81e38beeb2c1a3c8268c2f8 /src/index.tsx
parent570f47670bf9f361eeb073b9124be56465498c83 (diff)
refactor: move styles into separate components
Diffstat (limited to 'src/index.tsx')
-rw-r--r--src/index.tsx18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/index.tsx b/src/index.tsx
index bed8b66..9bcdfe9 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -2,23 +2,21 @@ import { render } from 'preact';
import { useEffect, useMemo } from 'preact/hooks';
import { Router } from 'preact-router';
import PocketBase from 'pocketbase';
-import { Pb } from './pb.ts';
+import { Pb } from './context.ts';
import { Home, SignUp, LogIn, ProjectsList } from './pages';
-import { NodeEditor } from './NodeEditor.tsx';
+import NodeEditor from './NodeEditor.tsx';
+import { Header, Button } from './components';
import './index.css';
export const App = () => {
const pb = useMemo(() => new PocketBase(`/`));
return (
<Pb.Provider value={pb}>
- <header>
- <a class="title action" href="/">DataNodes</a>
- <nav>
- < a class="action" href="/play">Try Now</a>
- <a class="action" href="/login">Log In</a>
- <a class="action" href="/signup">Sign Up</a>
- </nav>
- </header>
+ <Header>
+ <Button kind="ghost" href="/play">Try Now</Button>
+ <Button kind="ghost" href="/login">Log In</Button>
+ <Button kind="ghost" href="/signup">Sign Up</Button>
+ </Header>
<Router>
<Home path="/" />
<SignUp path="/signup" />