-
-
+ const name = profile?.display_name || profile?.username || "账户";
+ const currentWorkspace = workspaces.find((w) => w.id === workspace);
+ const filtered = boards.filter((b) => b.title.toLocaleLowerCase().includes(query.trim().toLocaleLowerCase()));
+ const canCreate = status === "ready" && (!workspace || Boolean(currentWorkspace && currentWorkspace.role !== "viewer"));
+
+ const createButton =
;
+
+ if (collapsed) return (
+
+
setCollapsed(false)} />
+ {createButton}
+ {error && {error}
}
);
+
+ return (
+
+ );
}
diff --git a/src/app/dashboard/layout.tsx b/src/app/dashboard/layout.tsx
new file mode 100644
index 0000000..91a92e9
--- /dev/null
+++ b/src/app/dashboard/layout.tsx
@@ -0,0 +1,14 @@
+import { Suspense, type ReactNode } from "react";
+import DashboardSidebar from "./dashboard";
+import styles from "@/components/workspace/workspace.module.css";
+
+export default function DashboardLayout({ children }: { children: ReactNode }) {
+ return (
+
+ }>
+
+
+ {children}
+
+ );
+}
diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx
index a9c479c..8bf79c1 100644
--- a/src/app/dashboard/page.tsx
+++ b/src/app/dashboard/page.tsx
@@ -1,15 +1,3 @@
-import { Suspense } from "react";
-import Dashboard from "./dashboard";
-
export default function DashboardPage() {
- return (
-
-
-
-
- }>
-