From fcb567a19839fa54607bcd59b72d4d01fb42f252 Mon Sep 17 00:00:00 2001 From: denis0001-dev Date: Sun, 21 Sep 2025 14:27:49 +0300 Subject: [PATCH] Improve logging, fix bugs --- frontend/src/ui/screen/LoginScreen.tsx | 7 ++++--- frontend/src/utils/pushNotifications.ts | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/ui/screen/LoginScreen.tsx b/frontend/src/ui/screen/LoginScreen.tsx index b5d11b1..a0d81ee 100644 --- a/frontend/src/ui/screen/LoginScreen.tsx +++ b/frontend/src/ui/screen/LoginScreen.tsx @@ -65,6 +65,8 @@ export default function LoginScreen() { } catch (e) { console.error("Key setup failed:", e); } + + setCurrentPage("chat"); // Initialize push notifications try { @@ -81,13 +83,12 @@ export default function LoginScreen() { } else { console.log("Push notification permission denied"); } + } else { + console.log("Not supported"); } } catch (e) { console.error("Push notification setup failed:", e); } - - setCurrentPage("chat"); - // initializeProfile(); // Initialize profile after login } else { const data: ErrorResponse = await response.json(); showAlert("danger", data.message || "Неверное имя пользователя или пароль"); diff --git a/frontend/src/utils/pushNotifications.ts b/frontend/src/utils/pushNotifications.ts index e1aeca0..15fa511 100644 --- a/frontend/src/utils/pushNotifications.ts +++ b/frontend/src/utils/pushNotifications.ts @@ -145,4 +145,4 @@ class PushNotificationManager { } } -export const pushNotificationManager = new PushNotificationManager(); +export const pushNotificationManager = new PushNotificationManager(); \ No newline at end of file