Modification win.loc to navigateTO()

This commit is contained in:
NigeParis 2026-01-13 15:48:54 +01:00 committed by Maix0
parent b49641d71c
commit ca1865b850
3 changed files with 13 additions and 6 deletions

View file

@ -9,6 +9,7 @@ import type {
import type { User } from "@app/auth";
import {
addRoute,
navigateTo,
setTitle,
type RouteHandlerParams,
type RouteHandlerReturn,
@ -312,14 +313,14 @@ sendButton?.addEventListener("click", () => {
case "@pong":
if (msgCommand[1] === "") {
window.location.href = "/app/pong/games";
navigateTo("/app/pong/games");
quitChat();
}
break;
case "@ttt":
if (msgCommand[1] === "") {
window.location.href = "/app/ttt/games";
navigateTo("/app/ttt/games");
quitChat();
}
break;
@ -432,12 +433,12 @@ bquit?.addEventListener("click", () => {
});
myGames?.addEventListener("click", () => {
window.location.href = "/app/pong/games";
navigateTo("/app/pong/games");
quitChat();
});
myTTTGames?.addEventListener("click", () => {
window.location.href = "/app/ttt/games";
navigateTo("/app/ttt/games");
quitChat();
});