Adds first version of the app. Local storage only.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import { useEffect } from 'react'
|
||||
import { useProjectStore } from '../../state/projectStore'
|
||||
import FlowCanvas from '../canvas/FlowCanvas'
|
||||
import DevicePalette from '../palette/DevicePalette'
|
||||
import ConnectionErrorBanner from './ConnectionErrorBanner'
|
||||
import RightPanel from './RightPanel'
|
||||
import TopBar from './TopBar'
|
||||
|
||||
export default function AppShell() {
|
||||
const isLoaded = useProjectStore((s) => s.isLoaded)
|
||||
const loadFromStorage = useProjectStore((s) => s.loadFromStorage)
|
||||
|
||||
useEffect(() => {
|
||||
loadFromStorage()
|
||||
}, [loadFromStorage])
|
||||
|
||||
if (!isLoaded) {
|
||||
return <div className="flex h-screen items-center justify-center text-sm text-slate-400">Loading…</div>
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex h-screen flex-col">
|
||||
<TopBar />
|
||||
<div className="flex min-h-0 flex-1">
|
||||
<DevicePalette />
|
||||
<main className="relative min-w-0 flex-1">
|
||||
<ConnectionErrorBanner />
|
||||
<FlowCanvas />
|
||||
</main>
|
||||
<RightPanel />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user