diff --git a/web/src/App.tsx b/web/src/App.tsx index 62713f0..64106e8 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -19,6 +19,8 @@ import { Historial } from "./Historial.js"; import { BackCanvas, type Endpoint } from "./BackCanvas.js"; import { KeyPanel, loadStoredCredencial, type Credencial } from "./KeyPanel.js"; import { useTextos } from "./i18n.js"; +import { MenuSalas } from "./MenuSalas.js"; +import { recordarSala } from "./historial-salas.js"; // El roomId vive en el hash de la URL: #/sala/taco-fiesta-42 function readRoomFromHash(): string | null { @@ -49,6 +51,9 @@ export function App() { setName={setName} onEnter={() => { localStorage.setItem("multi-name", name || "anónimo"); + // Se anota AQUÍ y no al leer el hash: abrir un link que no llegaste a + // usar no debería llenarte el historial. + recordarSala(roomId); setEntered(true); }} /> @@ -437,8 +442,11 @@ function Sala({ roomId, name }: { roomId: string; name: string }) { {/* Chat izquierda */}