import { useRef } from "react"; import Admin from "@/models/admin"; import paths from "@/utils/paths"; import { LinkSimple, Trash } from "@phosphor-icons/react"; export default function WorkspaceRow({ workspace, users }) { const rowRef = useRef(null); const handleDelete = async () => { if ( !window.confirm( `您确定要删除吗 ${workspace.name}?\nAfter you do this it will be unavailable in this instance of AnythingLLM.\n\nThis action is irreversible.` ) ) return false; rowRef?.current?.remove(); await Admin.deleteWorkspace(workspace.id); }; return ( <>