summaryrefslogtreecommitdiff
path: root/frontend/src/App.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/App.tsx')
-rw-r--r--frontend/src/App.tsx19
1 files changed, 19 insertions, 0 deletions
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
new file mode 100644
index 0000000..0a0e008
--- /dev/null
+++ b/frontend/src/App.tsx
@@ -0,0 +1,19 @@
+import React from 'react'
+import { useStore } from '@nanostores/react'
+import { LandingPage } from './components/LandingPage'
+import { VNInterface } from './components/VNInterface'
+import { isLoggedInStore, login, logout } from './stores'
+
+export default function App() {
+ const isLoggedIn = useStore(isLoggedInStore)
+
+ return (
+ <>
+ {isLoggedIn ? (
+ <VNInterface onLogout={logout} />
+ ) : (
+ <LandingPage onLogin={login} />
+ )}
+ </>
+ )
+}