MCPcopy Create free account
hub / github.com/MiniMax-AI/OpenRoom / handleDelete

Function handleDelete

apps/webuiapps/src/components/ChatPanel/ModPanel.tsx:34–41  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

32 };
33
34 const handleDelete = (id: string) => {
35 if (mods.length <= 1) return;
36 const items = { ...col.items };
37 delete items[id];
38 const newActiveId = col.activeId === id ? Object.keys(items)[0] : col.activeId;
39 setCol({ activeId: newActiveId, items });
40 if (editingId === id) setEditingId(null);
41 };
42
43 const handleAdd = () => {
44 const id = generateModId();

Callers 1

ModPanelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected