// frontend/components/tasks/TreeAdd.tsx — 인라인 새 프로젝트 생성 "use client"; import { useState } from "react"; import { Icon } from "@/components/Icon"; export function TreeAdd({ depth, placeholder, onAdd, }: { depth: number; placeholder: string; onAdd: (name: string) => void; }) { const [editing, setEditing] = useState(false); const [val, setVal] = useState(""); const commit = () => { const v = val.trim(); if (v) onAdd(v); setVal(""); setEditing(false); }; if (!editing) { return ( ); } return (