From 5ab418569224dbb4a35da996e15afcadf4cd94f1 Mon Sep 17 00:00:00 2001 From: user040131 Date: Fri, 10 Apr 2026 02:19:58 +0900 Subject: [PATCH] perf: improve sidebar navigation responsiveness --- apps/web/app/(pages)/loading.tsx | 49 +++++++++++++++++++ apps/web/components/layout/app-shell.tsx | 3 ++ apps/web/components/layout/route-prefetch.tsx | 25 ++++++++++ 3 files changed, 77 insertions(+) create mode 100644 apps/web/app/(pages)/loading.tsx create mode 100644 apps/web/components/layout/route-prefetch.tsx diff --git a/apps/web/app/(pages)/loading.tsx b/apps/web/app/(pages)/loading.tsx new file mode 100644 index 0000000..a33f58a --- /dev/null +++ b/apps/web/app/(pages)/loading.tsx @@ -0,0 +1,49 @@ +import { Card } from "@/components/shared/card"; + +export default function PagesLoading() { + return ( +
+ +
+
+
+
+
+
+
+
+
+
+ + +
+ {Array.from({ length: 4 }).map((_, index) => ( + +
+
+
+ + ))} +
+ +
+ {Array.from({ length: 2 }).map((_, index) => ( + +
+
+
+
+
+
+ + ))} +
+
+ ); +} diff --git a/apps/web/components/layout/app-shell.tsx b/apps/web/components/layout/app-shell.tsx index e415450..b7a1bb6 100644 --- a/apps/web/components/layout/app-shell.tsx +++ b/apps/web/components/layout/app-shell.tsx @@ -1,6 +1,7 @@ import Link from "next/link"; import { Activity, Database, Gauge, LayoutGrid, ShieldAlert, Sparkles } from "lucide-react"; import { cn } from "@/components/shared/cn"; +import { RoutePrefetch } from "@/components/layout/route-prefetch"; const navItems = [ { href: "/dashboard", label: "대시보드", icon: LayoutGrid }, @@ -14,6 +15,7 @@ const navItems = [ export function AppShell({ children }: { children: React.ReactNode }) { return (
+