2026-06-18 08:14:00 -04:00
|
|
|
import { useState } from 'react'
|
2026-06-18 16:15:34 +00:00
|
|
|
import { Routes, Route } from 'react-router-dom'
|
2026-06-18 08:14:00 -04:00
|
|
|
import Sidebar from './components/Sidebar'
|
|
|
|
|
import TopBar from './components/TopBar'
|
2026-06-18 16:15:34 +00:00
|
|
|
import Glance from './pages/Glance'
|
|
|
|
|
import Infrastructure from './pages/Infrastructure'
|
2026-06-18 08:14:00 -04:00
|
|
|
|
|
|
|
|
function App() {
|
|
|
|
|
const [sidebarCollapsed, setSidebarCollapsed] = useState(false)
|
2026-06-18 14:45:00 +00:00
|
|
|
const sidebarWidth = sidebarCollapsed ? 64 : 200
|
2026-06-18 08:14:00 -04:00
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="min-h-screen w-screen overflow-hidden bg-page">
|
|
|
|
|
<Sidebar
|
|
|
|
|
collapsed={sidebarCollapsed}
|
|
|
|
|
onToggle={() => setSidebarCollapsed(!sidebarCollapsed)}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<main
|
|
|
|
|
className="h-screen overflow-hidden"
|
|
|
|
|
style={{ marginLeft: `${sidebarWidth}px`, width: `calc(100vw - ${sidebarWidth}px)` }}
|
|
|
|
|
>
|
|
|
|
|
<TopBar />
|
|
|
|
|
|
|
|
|
|
<section
|
2026-06-18 14:53:34 +00:00
|
|
|
className="flex w-full flex-col overflow-hidden"
|
|
|
|
|
style={{ height: 'calc(100vh - 56px)', scrollbarWidth: 'none', padding: '16px 24px 24px 24px', gap: '20px' }}
|
2026-06-18 08:14:00 -04:00
|
|
|
>
|
2026-06-18 16:15:34 +00:00
|
|
|
<Routes>
|
|
|
|
|
<Route path="/" element={<Glance />} />
|
|
|
|
|
<Route path="/infrastructure" element={<Infrastructure />} />
|
|
|
|
|
</Routes>
|
2026-06-18 08:14:00 -04:00
|
|
|
</section>
|
|
|
|
|
</main>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default App
|