Skip to content

Commit 52ff71c

Browse files
committed
refactor: Wrap AppLayout in SidebarProvider and clean up package.json scripts
1 parent 8baef1c commit 52ff71c

File tree

2 files changed

+29
-26
lines changed

2 files changed

+29
-26
lines changed

packages/web/app/AppLayout.tsx

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { NavigationSidebar, ErrorBoundary, AppLayoutSkeleton, TopNavbar } from '
55
import { useDevlogContext } from './contexts/DevlogContext';
66
import { useStats } from '@/hooks/useStats';
77
import { Alert, AlertDescription } from '@/components/ui/alert';
8+
import { SidebarProvider } from '@/components/ui/sidebar';
89
import { AlertTriangle } from 'lucide-react';
910
import { cn } from '@/lib/utils';
1011

@@ -31,31 +32,33 @@ export function AppLayout({ children }: AppLayoutProps) {
3132

3233
return (
3334
<ErrorBoundary>
34-
<div className="min-h-screen bg-background">
35-
<TopNavbar />
36-
<div className="flex flex-1">
37-
<NavigationSidebar
38-
stats={stats}
39-
statsLoading={isLoadingStats}
40-
collapsed={sidebarCollapsed}
41-
connected={connected}
42-
onToggle={() => setSidebarCollapsed(!sidebarCollapsed)}
43-
/>
44-
<div className="flex-1 flex flex-col">
45-
<main className="flex-1 p-6">
46-
<div className="max-w-full">
47-
{error && (
48-
<Alert className="mb-4">
49-
<AlertTriangle className="h-4 w-4" />
50-
<AlertDescription>{error}</AlertDescription>
51-
</Alert>
52-
)}
53-
{children}
54-
</div>
55-
</main>
35+
<SidebarProvider>
36+
<div className="min-h-screen bg-background">
37+
<TopNavbar />
38+
<div className="flex flex-1">
39+
<NavigationSidebar
40+
stats={stats}
41+
statsLoading={isLoadingStats}
42+
collapsed={sidebarCollapsed}
43+
connected={connected}
44+
onToggle={() => setSidebarCollapsed(!sidebarCollapsed)}
45+
/>
46+
<div className="flex-1 flex flex-col">
47+
<main className="flex-1 p-6">
48+
<div className="max-w-full">
49+
{error && (
50+
<Alert className="mb-4">
51+
<AlertTriangle className="h-4 w-4" />
52+
<AlertDescription>{error}</AlertDescription>
53+
</Alert>
54+
)}
55+
{children}
56+
</div>
57+
</main>
58+
</div>
5659
</div>
5760
</div>
58-
</div>
61+
</SidebarProvider>
5962
</ErrorBoundary>
6063
);
6164
}

packages/web/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.0",
44
"description": "Web interface for devlog management",
55
"scripts": {
6-
"dev": "next dev --port 3000 --turbo",
6+
"dev": "next dev --port 3000",
77
"dev:full": "concurrently --names \"CORE,WEB\" --prefix-colors \"green,blue\" \"pnpm --filter @codervisor/devlog-core dev\" \"pnpm dev\"",
88
"build": "NEXT_BUILD_MODE=standalone next build",
99
"build:test": "NEXT_BUILD_MODE=standalone next build --no-lint",
@@ -52,10 +52,10 @@
5252
"tailwindcss-animate": "1.0.7",
5353
"typeorm": "0.3.25",
5454
"ws": "^8.14.2",
55-
"zod": "^3.25.67"
55+
"zod": "^3.25.67",
56+
"@tailwindcss/postcss": "4.1.11"
5657
},
5758
"devDependencies": {
58-
"@tailwindcss/postcss": "4.1.11",
5959
"@types/node": "^20.10.6",
6060
"@types/pg": "^8.11.0",
6161
"@types/react": "^18.2.48",

0 commit comments

Comments
 (0)