mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-24 16:58:47 +01:00
Fix opening account page doesn't close the Accounts sheet
This commit is contained in:
parent
adc4e8f53b
commit
e6065403e5
2 changed files with 7 additions and 2 deletions
|
@ -412,8 +412,11 @@ function App() {
|
|||
<AccountSheet
|
||||
account={snapStates.showAccount?.account || snapStates.showAccount}
|
||||
instance={snapStates.showAccount?.instance}
|
||||
onClose={() => {
|
||||
onClose={({ destination }) => {
|
||||
states.showAccount = false;
|
||||
if (destination) {
|
||||
states.showAccounts = false;
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</Modal>
|
||||
|
|
|
@ -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',
|
||||
});
|
||||
}
|
||||
}}
|
||||
>
|
||||
|
|
Loading…
Reference in a new issue