🆕 Disconnection handler, when you got disconnected you automatic go back to the room

This commit is contained in:
duckietm
2026-03-19 15:05:41 +01:00
parent 9d5dc99e69
commit 4f2299e492
4 changed files with 116 additions and 2 deletions
+3 -1
View File
@@ -1,4 +1,4 @@
import { AddLinkEventTracker, GetCommunication, HabboWebTools, ILinkEventTracker, RemoveLinkEventTracker, RoomSessionEvent } from '@nitrots/nitro-renderer';
import { AddLinkEventTracker, GetCommunication, GetRoomSessionManager, HabboWebTools, ILinkEventTracker, RemoveLinkEventTracker, RoomSessionEvent } from '@nitrots/nitro-renderer';
import { AnimatePresence, motion } from 'framer-motion';
import { FC, useEffect, useState } from 'react';
import { useNitroEvent } from '../hooks';
@@ -41,6 +41,8 @@ export const MainView: FC<{}> = props =>
{
setIsReady(true);
GetRoomSessionManager().tryRestoreSession();
GetCommunication().connection.ready();
}, []);