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:
@@ -66,6 +66,8 @@ export default function LoginScreen() {
|
|||||||
console.error("Key setup failed:", e);
|
console.error("Key setup failed:", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setCurrentPage("chat");
|
||||||
|
|
||||||
// Initialize push notifications
|
// Initialize push notifications
|
||||||
try {
|
try {
|
||||||
if (pushNotificationManager.isSupported()) {
|
if (pushNotificationManager.isSupported()) {
|
||||||
@@ -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 || "Неверное имя пользователя или пароль");
|
||||||
|
|||||||
Reference in New Issue
Block a user