Improve logging, fix bugs

This commit is contained in:
2025-09-21 14:27:49 +03:00
Unverified
parent b53deae633
commit fcb567a198
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -65,6 +65,8 @@ export default function LoginScreen() {
} catch (e) { } catch (e) {
console.error("Key setup failed:", e); console.error("Key setup failed:", e);
} }
setCurrentPage("chat");
// Initialize push notifications // Initialize push notifications
try { try {
@@ -81,13 +83,12 @@ export default function LoginScreen() {
} else { } else {
console.log("Push notification permission denied"); console.log("Push notification permission denied");
} }
} else {
console.log("Not supported");
} }
} catch (e) { } catch (e) {
console.error("Push notification setup failed:", e); console.error("Push notification setup failed:", e);
} }
setCurrentPage("chat");
// initializeProfile(); // Initialize profile after login
} else { } else {
const data: ErrorResponse = await response.json(); const data: ErrorResponse = await response.json();
showAlert("danger", data.message || "Неверное имя пользователя или пароль"); showAlert("danger", data.message || "Неверное имя пользователя или пароль");
+1 -1
View File
@@ -145,4 +145,4 @@ class PushNotificationManager {
} }
} }
export const pushNotificationManager = new PushNotificationManager(); export const pushNotificationManager = new PushNotificationManager();