(event: React.MouseEvent<HTMLButtonElement, MouseEvent> | null, tabId: string)
| 540 | }; |
| 541 | |
| 542 | const handleCloseTab = (event: React.MouseEvent<HTMLButtonElement, MouseEvent> | null, tabId: string) => { |
| 543 | event?.stopPropagation(); |
| 544 | env.electron |
| 545 | .closeTab(workspace.oid, tabId, confirmClose) |
| 546 | .then((didClose) => { |
| 547 | if (didClose) { |
| 548 | tabsWrapperRef.current?.style.setProperty("--tabs-wrapper-transition", "width 0.3s ease"); |
| 549 | deleteLayoutModelForTab(tabId); |
| 550 | } |
| 551 | }) |
| 552 | .catch((e) => { |
| 553 | console.log("error closing tab", e); |
| 554 | }); |
| 555 | }; |
| 556 | |
| 557 | const handleTabLoaded = useCallback((tabId: string) => { |
| 558 | setTabsLoaded((prev) => { |
no test coverage detected