diff --git a/apps/web/app/components/workspace/empty-state.tsx b/apps/web/app/components/workspace/empty-state.tsx index 484abf35712..c4311883375 100644 --- a/apps/web/app/components/workspace/empty-state.tsx +++ b/apps/web/app/components/workspace/empty-state.tsx @@ -1,21 +1,20 @@ "use client"; -import { useState } from "react"; -import { CreateWorkspaceDialog } from "./create-workspace-dialog"; +function shortenPath(p: string): string { + return p + .replace(/^\/Users\/[^/]+/, "~") + .replace(/^\/home\/[^/]+/, "~") + .replace(/^[A-Za-z]:[/\\]Users[/\\][^/\\]+/, "~"); +} export function EmptyState({ workspaceExists, expectedPath, - onWorkspaceCreated, }: { workspaceExists: boolean; /** The resolved workspace path to display (e.g. from the tree API). */ expectedPath?: string | null; - /** Called after a workspace is created from this empty state. */ - onWorkspaceCreated?: () => void; }) { - const [showCreate, setShowCreate] = useState(false); - return (