From b4ad379414bfc60e09b30b0d3d34c62aaace8c78 Mon Sep 17 00:00:00 2001 From: AlecM33 Date: Sun, 13 Aug 2023 18:56:04 -0400 Subject: [PATCH] remove redundant promise handler --- client/src/scripts/game.js | 4 +--- client/src/view_templates/GameTemplate.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/client/src/scripts/game.js b/client/src/scripts/game.js index f5760bd..b7d80d1 100644 --- a/client/src/scripts/game.js +++ b/client/src/scripts/game.js @@ -3,8 +3,6 @@ import { io } from 'socket.io-client'; import gameTemplate from '../view_templates/GameTemplate.js'; import { toast } from '../modules/front_end_components/Toast.js'; -gameHandler(io('/in-game'), window, gameTemplate).then(() => { - toast('Connecting...', 'warning', true, false); -}).catch((e) => { +gameHandler(io('/in-game'), window, gameTemplate).catch((e) => { toast(e.message, 'error', true, false); }); diff --git a/client/src/view_templates/GameTemplate.js b/client/src/view_templates/GameTemplate.js index 2bca8ea..acd83c1 100644 --- a/client/src/view_templates/GameTemplate.js +++ b/client/src/view_templates/GameTemplate.js @@ -18,7 +18,7 @@ const template =
-

Waiting for connection to Room...

+

Connecting to the Room...