|
|
@ -26,7 +26,12 @@ function AuthApp() {
|
|
|
|
state.disconnectWebsocket,
|
|
|
|
state.disconnectWebsocket,
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
Notification.requestPermission();
|
|
|
|
if (!("Notification" in window)) {
|
|
|
|
|
|
|
|
alert("This browser does not support desktop notification");
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
Notification.requestPermission();
|
|
|
|
|
|
|
|
}
|
|
|
|
if (loginUser.userId > 0) {
|
|
|
|
if (loginUser.userId > 0) {
|
|
|
|
connectWebsocket(loginUser.userId);
|
|
|
|
connectWebsocket(loginUser.userId);
|
|
|
|
fetchInitialData(loginUser.userId); // userIdStr
|
|
|
|
fetchInitialData(loginUser.userId); // userIdStr
|
|
|
|