import { useState } from "react";
import { Terminal } from "./components/Terminal";
export function App() {
const [cwd, setCwd] = useState(() => {
const params = new URLSearchParams(window.location.search);
return params.get("cwd") ?? "/";
});
return (
);
}
function CwdInput({ cwd, onChange }: { cwd: string; onChange: (cwd: string) => void }) {
const [editing, setEditing] = useState(false);
const [draft, setDraft] = useState(cwd);
if (editing) {
return (
);
}
return (
);
}