(id: string)
| 256 | } |
| 257 | |
| 258 | const handleDelete = (id: string) => { |
| 259 | deleteThread(id) |
| 260 | if (id === activeId) { |
| 261 | const next = threads.find((t) => t.id !== id) |
| 262 | // If nothing remains the bootstrap effect creates a fresh thread. |
| 263 | setActiveId(next ? next.id : null) |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | return ( |
| 268 | <div className="flex h-[calc(100vh-72px)] bg-gray-900 text-white"> |
no test coverage detected