mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-22 19:15:08 +03:00
Improve logging, fix bugs
This commit is contained in:
@@ -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 || "Неверное имя пользователя или пароль");
|
||||||
|
|||||||
@@ -145,4 +145,4 @@ class PushNotificationManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const pushNotificationManager = new PushNotificationManager();
|
export const pushNotificationManager = new PushNotificationManager();
|
||||||
Reference in New Issue
Block a user