From e6065403e56a506124d5958a66c0e2f8978aea6e Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sat, 11 Mar 2023 18:13:53 +0800 Subject: [PATCH] Fix opening account page doesn't close the Accounts sheet --- src/app.jsx | 5 ++++- src/components/account-sheet.jsx | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app.jsx b/src/app.jsx index d2a19ca4..ed6146a8 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -412,8 +412,11 @@ function App() { { + onClose={({ destination }) => { states.showAccount = false; + if (destination) { + states.showAccounts = false; + } }} /> diff --git a/src/components/account-sheet.jsx b/src/components/account-sheet.jsx index d202866c..78b89aba 100644 --- a/src/components/account-sheet.jsx +++ b/src/components/account-sheet.jsx @@ -17,7 +17,9 @@ function AccountSheet({ account, instance: propInstance, onClose }) { onClick={(e) => { const accountBlock = e.target.closest('.account-block'); if (accountBlock) { - onClose(); + onClose({ + destination: 'account-statuses', + }); } }} >