Skip to content

A local-first personal finance app

Close budget before open config-server page

Jed Foxd61107312ad5
diff --git a/packages/desktop-client/src/components/LoggedInUser.js b/packages/desktop-client/src/components/LoggedInUser.js
index c4d115f936..d3bae724a6 100644
--- a/packages/desktop-client/src/components/LoggedInUser.js
+++ b/packages/desktop-client/src/components/LoggedInUser.js
@@ -37,7 +37,7 @@ function LoggedInUser({
async function onChangePassword() {
await closeBudget();
- history.push('/change-password');
+ window.__history.push('/change-password');
}
function onMenuSelect(type) {
@@ -54,11 +54,12 @@ function LoggedInUser({
}
}
- function onClick() {
+ async function onClick() {
if (serverUrl) {
setMenuOpen(true);
} else {
- history.push('/config-server');
+ await closeBudget();
+ window.__history.push('/config-server');
}
}