This repository has been archived on 2026-07-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
codespace/web/src/pages/workspace/WorkspacePage.tsx
T
2026-07-02 17:23:48 +08:00

29 lines
1.1 KiB
TypeScript

import { findFileByPath, mockWorkspaceFiles } from "@/pages/workspace/mock-data";
import { useWorkspaceUiStore } from "@/lib/store/workspace-ui-store";
export function WorkspacePage() {
const activeFilePath = useWorkspaceUiStore((s) => s.activeFilePath);
const activeFile = findFileByPath(mockWorkspaceFiles, activeFilePath);
return (
<div className="flex h-full flex-col bg-background text-foreground">
<header className="border-b border-border px-4 py-2">
<h1 className="text-sm font-semibold">Codespace Workspace</h1>
</header>
<div className="flex-1 overflow-auto p-4">
<p className="text-sm text-muted-foreground">
Active file: <code className="text-foreground">{activeFilePath}</code>
</p>
<p className="mt-2 text-sm text-muted-foreground">
Mock file match:{" "}
<code className="text-foreground">
{activeFile
? `${activeFile.name} (${activeFile.language ?? activeFile.kind})`
: "not found"}
</code>
</p>
</div>
</div>
);
}