From 21f492fb134fa2246fb5f9b7f9a614179d8716a0 Mon Sep 17 00:00:00 2001 From: Soham Kulkarni <150679961+sohamsk13@users.noreply.github.com> Date: Wed, 2 Jul 2025 23:01:15 +0530 Subject: [PATCH] Update App.tsx --- packages/excalidraw/components/App.tsx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/packages/excalidraw/components/App.tsx b/packages/excalidraw/components/App.tsx index 54305e4e97..29c84cd1f0 100644 --- a/packages/excalidraw/components/App.tsx +++ b/packages/excalidraw/components/App.tsx @@ -593,6 +593,11 @@ class App extends React.Component { * insert to DOM before user initially scrolls to them) */ private initializedEmbeds = new Set(); + private handleToastClose = () => { + this.setToast(null); + }; + + private elementsPendingErasure: ElementsPendingErasure = new Set(); public flowChartCreator: FlowChartCreator = new FlowChartCreator(); @@ -1707,14 +1712,16 @@ class App extends React.Component { /> )} + {this.state.toast !== null && ( - this.setToast(null)} - duration={this.state.toast.duration} - closable={this.state.toast.closable} - /> + )} + {this.state.contextMenu && (