feat: add app shell with top bar, view routing, and board factory
This commit is contained in:
36
src/App.tsx
36
src/App.tsx
@@ -1,7 +1,37 @@
|
||||
import { useEffect } from "react";
|
||||
import { useAppStore } from "@/stores/app-store";
|
||||
import { AppShell } from "@/components/layout/AppShell";
|
||||
|
||||
export default function App() {
|
||||
const initialized = useAppStore((s) => s.initialized);
|
||||
const init = useAppStore((s) => s.init);
|
||||
const view = useAppStore((s) => s.view);
|
||||
|
||||
useEffect(() => {
|
||||
init();
|
||||
}, [init]);
|
||||
|
||||
if (!initialized) {
|
||||
return (
|
||||
<div className="flex h-screen items-center justify-center bg-pylon-bg">
|
||||
<span className="font-heading text-lg text-pylon-text-secondary">
|
||||
Loading...
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="h-screen flex items-center justify-center bg-background text-foreground">
|
||||
<h1 className="text-2xl font-bold">OpenPylon</h1>
|
||||
</div>
|
||||
<AppShell>
|
||||
{view.type === "board-list" ? (
|
||||
<div className="flex h-full items-center justify-center text-pylon-text-secondary">
|
||||
Board List
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex h-full items-center justify-center text-pylon-text-secondary">
|
||||
Board View
|
||||
</div>
|
||||
)}
|
||||
</AppShell>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user