From 943ce4248649c1238be39e5b3cc00bf1c9e9788c Mon Sep 17 00:00:00 2001 From: PhilReact Date: Tue, 29 Oct 2024 07:31:33 +0200 Subject: [PATCH] case --- src/App.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index bb36bc1..1e560cb 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1044,12 +1044,17 @@ function App() { if(hasSettingsChanged){ await showUnsavedChanges({message: 'Your settings have changed. If you logout you will lose your changes. Click on the save button in the header to keep your changed settings.'}) } - chrome?.runtime?.sendMessage({ action: "logout" }, (response) => { + window.sendMessage("logout", {}) + .then((response) => { if (response) { resetAllStates(); executeEvent("logout-event", {}); } + }) + .catch((error) => { + console.error("Failed to log out:", error.message || "An error occurred"); }); + } catch (error) {} };